Trait argdata::Map [−][src]
pub trait Map<'d> { fn iter_map_next<'a>(
&'a self,
cookie: &mut usize
) -> Option<Result<(ArgdataRef<'a, 'd>, ArgdataRef<'a, 'd>), ReadError>>
where
'd: 'a; }
An argdata value representing a map.
Required Methods
fn iter_map_next<'a>(
&'a self,
cookie: &mut usize
) -> Option<Result<(ArgdataRef<'a, 'd>, ArgdataRef<'a, 'd>), ReadError>> where
'd: 'a,
&'a self,
cookie: &mut usize
) -> Option<Result<(ArgdataRef<'a, 'd>, ArgdataRef<'a, 'd>), ReadError>> where
'd: 'a,
Iterate to the next key-value pair, returning None if the end is reached.
You probably want to use iter_map
instead, which gives you a normal Iterator.
cookie
should be 0 for the first element, and is modified by this method to refer to the
next key-value pair on each call. The value of the cookie
is implementation-specific. It
might for example be the index into a vector, or the byte-offset into an encoded argdata
value.
Might panic if you give it an invalid cookie
.
Methods
impl<'a, 'd: 'a> Map<'d> + 'a
[src]
impl<'a, 'd: 'a> Map<'d> + 'a
ⓘImportant traits for MapIterator<'a, 'd>pub fn iter_map(&'a self) -> MapIterator<'a, 'd>
[src]
ⓘImportant traits for MapIterator<'a, 'd>
pub fn iter_map(&'a self) -> MapIterator<'a, 'd>
Get an iterator to the key-value pairs of the map.
Implementors
impl<'d, F: ConvertFd> Map<'d> for EncodedArgdata<'d, F>
impl<'d, T> Map<'d> for Map<'d, T> where
T: MapContainer,
<T as MapContainer>::Key: Argdata<'d>,
<T as MapContainer>::Value: Argdata<'d>,