Struct protobuf_codec::field::MapMessageFieldDecoder
[−]
[src]
pub struct MapMessageFieldDecoder<F, K, V, M> where
M: IntoIterator<Item = (K::Item, V::Item)>,
K: MapKeyDecode,
V: MessageDecode, { /* fields omitted */ }
Decoder for map fields which have message values.
Methods
impl<F, K, V, M> MapMessageFieldDecoder<F, K, V, M> where
K: MapKeyDecode,
V: MessageDecode,
M: IntoIterator<Item = (K::Item, V::Item)> + Default,
[src]
K: MapKeyDecode,
V: MessageDecode,
M: IntoIterator<Item = (K::Item, V::Item)> + Default,
pub fn new(field_num: F, key_decoder: K, value_decoder: V) -> Self
[src]
Makes a new MapMessageFieldDecoder
instance.
Trait Implementations
impl<F: Default, K: Default, V: Default, M: Default> Default for MapMessageFieldDecoder<F, K, V, M> where
M: IntoIterator<Item = (K::Item, V::Item)>,
K: MapKeyDecode,
V: MessageDecode,
[src]
M: IntoIterator<Item = (K::Item, V::Item)>,
K: MapKeyDecode,
V: MessageDecode,
fn default() -> MapMessageFieldDecoder<F, K, V, M>
[src]
Returns the "default value" for a type. Read more
impl<F, K, V, M> Decode for MapMessageFieldDecoder<F, K, V, M> where
F: Copy + Into<FieldNum>,
K: MapKeyDecode,
V: MessageDecode,
M: Default + Extend<(K::Item, V::Item)> + IntoIterator<Item = (K::Item, V::Item)>,
[src]
F: Copy + Into<FieldNum>,
K: MapKeyDecode,
V: MessageDecode,
M: Default + Extend<(K::Item, V::Item)> + IntoIterator<Item = (K::Item, V::Item)>,
type Item = M
The type of items to be decoded.
fn decode(&mut self, buf: &[u8], eos: Eos) -> Result<usize>
[src]
Consumes the given buffer (a part of a byte sequence), and proceeds the decoding process. Read more
fn finish_decoding(&mut self) -> Result<Self::Item>
[src]
Finishes the current decoding process and returns the decoded item. Read more
fn is_idle(&self) -> bool
[src]
Returns true
if there are no items to be decoded by the decoder at the next invocation of decode
method, otherwise false
. Read more
fn requiring_bytes(&self) -> ByteCount
[src]
Returns the lower bound of the number of bytes needed to decode the next item. Read more
impl<F, K, V, M> FieldDecode for MapMessageFieldDecoder<F, K, V, M> where
F: Copy + Into<FieldNum>,
K: MapKeyDecode,
V: MessageDecode,
M: Default + Extend<(K::Item, V::Item)> + IntoIterator<Item = (K::Item, V::Item)>,
[src]
F: Copy + Into<FieldNum>,
K: MapKeyDecode,
V: MessageDecode,
M: Default + Extend<(K::Item, V::Item)> + IntoIterator<Item = (K::Item, V::Item)>,
fn start_decoding(&mut self, tag: Tag) -> Result<bool>
[src]
Tries to start decoding a field. Read more
impl<F, K, V, M> Debug for MapMessageFieldDecoder<F, K, V, M> where
K: MapKeyDecode,
V: MessageDecode,
M: IntoIterator<Item = (K::Item, V::Item)>,
[src]
K: MapKeyDecode,
V: MessageDecode,
M: IntoIterator<Item = (K::Item, V::Item)>,
Auto Trait Implementations
impl<F, K, V, M> Send for MapMessageFieldDecoder<F, K, V, M> where
F: Send,
K: Send,
M: Send,
V: Send,
<M as IntoIterator>::IntoIter: Send,
F: Send,
K: Send,
M: Send,
V: Send,
<M as IntoIterator>::IntoIter: Send,
impl<F, K, V, M> Sync for MapMessageFieldDecoder<F, K, V, M> where
F: Sync,
K: Sync,
M: Sync,
V: Sync,
<M as IntoIterator>::IntoIter: Sync,
F: Sync,
K: Sync,
M: Sync,
V: Sync,
<M as IntoIterator>::IntoIter: Sync,