[][src]Struct flexbuffers::MapReader

pub struct MapReader<'de> { /* fields omitted */ }

Allows indexing on a flexbuffer map.

MapReaders may be indexed with strings or usizes. index returns a result type, which may indicate failure due to a missing key or bad data, idx returns an Null Reader in cases of error.

Implementations

impl<'de> MapReader<'de>[src]

pub fn len(&self) -> usize[src]

Returns the number of key/value pairs are in the map.

pub fn is_empty(&self) -> bool[src]

Returns true if the map has zero key/value pairs.

pub fn index_key(&self, key: &str) -> Option<usize>[src]

Returns the index of a given key in the map.

pub fn index<I: MapReaderIndexer>(&self, i: I) -> Result<Reader<'de>, Error>[src]

Index into a map with a key or usize.

pub fn idx<I: MapReaderIndexer>(&self, i: I) -> Reader<'de>[src]

Index into a map with a key or usize. If any errors occur a Null reader is returned.

pub fn iter_values(&self) -> ReaderIterator<'de>[src]

Iterate over the values of the map.

pub fn iter_keys(
    &self
) -> impl Iterator<Item = &'de str> + DoubleEndedIterator + ExactSizeIterator + FusedIterator
[src]

Iterate over the keys of the map.

pub fn keys_vector(&self) -> VectorReader<'de>[src]

Trait Implementations

impl<'de> Clone for MapReader<'de>[src]

impl<'de> Debug for MapReader<'de>[src]

impl<'de> Default for MapReader<'de>[src]

Auto Trait Implementations

impl<'de> RefUnwindSafe for MapReader<'de>

impl<'de> Send for MapReader<'de>

impl<'de> Sync for MapReader<'de>

impl<'de> Unpin for MapReader<'de>

impl<'de> UnwindSafe for MapReader<'de>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.