pub struct Map<'a> { /* private fields */ }Expand description
CBOR Map with references to keys and values
Implementations
sourceimpl<'a> Map<'a>
impl<'a> Map<'a>
pub fn len(&self) -> usize
pub fn iter(&'a self) -> impl Iterator<Item = (Reader<'a>, Reader<'a>)>
pub fn keys(&'a self) -> impl Iterator<Item = Reader<'a>>
pub fn values(&'a self) -> impl Iterator<Item = Reader<'a>>
pub fn to_vec<F, G, K: Decode, V: Decode>(
&self,
f: F,
g: G
) -> Result<Vec<(K, V)>, DecodeError> where
F: for<'b> Fn(&mut Reader<'b>) -> Result<K, DecodeError>,
G: for<'b> Fn(&mut Reader<'b>) -> Result<V, DecodeError>,
pub fn owned(&self) -> MapOwned
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Map<'a>
impl<'a> Send for Map<'a>
impl<'a> Sync for Map<'a>
impl<'a> Unpin for Map<'a>
impl<'a> UnwindSafe for Map<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more