pub struct Map(_);Expand description
A CBOR map.
Keys are kept sorted by encoded CBOR form in ascending lexicographic order.
Implementations§
source§impl Map
impl Map
sourcepub fn iter<'a>(&'a self) -> MapIter<'a> ⓘ
pub fn iter<'a>(&'a self) -> MapIter<'a> ⓘ
Gets an iterator over the entries of the CBOR map, sorted by key.
Key sorting order is lexicographic by the key’s binary-encoded CBOR.
sourcepub fn insert_into<K, V>(&mut self, k: K, v: V)where
K: CBOREncodable,
V: CBOREncodable,
pub fn insert_into<K, V>(&mut self, k: K, v: V)where K: CBOREncodable, V: CBOREncodable,
Inserts a key-value pair into the map.