Bencode implementation in Rust