pub struct Map(/* private fields */);Expand description
An map of (key, value) pairs.
In CBOR, each key and value may be of different types.
Use Map::from() to construct a map.
let map_pairs = vec![(1, 2), (3, 4)];
let map = Map::from(map_pairs);
assert_eq!(CborType::from(map).encode(), vec![0xa2, 1, 2, 3, 4]);Trait Implementations§
impl StructuralPartialEq for Map
Auto Trait Implementations§
impl Freeze for Map
impl RefUnwindSafe for Map
impl Send for Map
impl Sync for Map
impl Unpin for Map
impl UnwindSafe for Map
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more