Type Alias BencodexDictionary

Source
pub type BencodexDictionary = BTreeMap<BencodexKey, BencodexValue>;
Expand description

The type alias of BTreepMap<BencodexKey, BencodexValue> to reduce code size.

use bencodex::{ Encode, BencodexDictionary };

let mut dict = BencodexDictionary::new();
dict.insert("foo".into(), "bar".into());

let mut buf = vec![];
dict.encode(&mut buf);
assert_eq!(buf, b"du3:foou3:bare")

Aliased Typeยง

pub struct BencodexDictionary { /* private fields */ }