[−][src]Struct protobuf_codec::field::MapFieldDecoder
Decoder for map fields which have scalar values.
Methods
impl<F, K, V, M> MapFieldDecoder<F, K, V, M> where
K: MapKeyDecode,
V: ValueDecode,
M: IntoIterator<Item = (K::Item, V::Item)> + Default,
[src]
K: MapKeyDecode,
V: ValueDecode,
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 MapFieldDecoder
instance.
Trait Implementations
impl<F, K, V, M> FieldDecode for MapFieldDecoder<F, K, V, M> where
F: Copy + Into<FieldNum>,
K: MapKeyDecode,
V: ValueDecode,
M: Default + Extend<(K::Item, V::Item)> + IntoIterator<Item = (K::Item, V::Item)>,
[src]
F: Copy + Into<FieldNum>,
K: MapKeyDecode,
V: ValueDecode,
M: Default + Extend<(K::Item, V::Item)> + IntoIterator<Item = (K::Item, V::Item)>,
fn start_decoding(&mut self, tag: Tag) -> Result<bool>
[src]
impl<F: Default, K: Default, V: Default, M: Default> Default for MapFieldDecoder<F, K, V, M> where
M: IntoIterator<Item = (K::Item, V::Item)>,
K: MapKeyDecode,
V: ValueDecode,
[src]
M: IntoIterator<Item = (K::Item, V::Item)>,
K: MapKeyDecode,
V: ValueDecode,
fn default() -> MapFieldDecoder<F, K, V, M>
[src]
impl<F, K, V, M> Debug for MapFieldDecoder<F, K, V, M> where
K: MapKeyDecode,
V: ValueDecode,
M: IntoIterator<Item = (K::Item, V::Item)>,
[src]
K: MapKeyDecode,
V: ValueDecode,
M: IntoIterator<Item = (K::Item, V::Item)>,
impl<F, K, V, M> Decode for MapFieldDecoder<F, K, V, M> where
F: Copy + Into<FieldNum>,
K: MapKeyDecode,
V: ValueDecode,
M: Default + Extend<(K::Item, V::Item)> + IntoIterator<Item = (K::Item, V::Item)>,
[src]
F: Copy + Into<FieldNum>,
K: MapKeyDecode,
V: ValueDecode,
M: Default + Extend<(K::Item, V::Item)> + IntoIterator<Item = (K::Item, V::Item)>,
Auto Trait Implementations
impl<F, K, V, M> Send for MapFieldDecoder<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> Unpin for MapFieldDecoder<F, K, V, M> where
F: Unpin,
K: Unpin,
M: Unpin,
V: Unpin,
<M as IntoIterator>::IntoIter: Unpin,
F: Unpin,
K: Unpin,
M: Unpin,
V: Unpin,
<M as IntoIterator>::IntoIter: Unpin,
impl<F, K, V, M> Sync for MapFieldDecoder<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,
impl<F, K, V, M> UnwindSafe for MapFieldDecoder<F, K, V, M> where
F: UnwindSafe,
K: UnwindSafe,
M: UnwindSafe,
V: UnwindSafe,
<M as IntoIterator>::IntoIter: UnwindSafe,
F: UnwindSafe,
K: UnwindSafe,
M: UnwindSafe,
V: UnwindSafe,
<M as IntoIterator>::IntoIter: UnwindSafe,
impl<F, K, V, M> RefUnwindSafe for MapFieldDecoder<F, K, V, M> where
F: RefUnwindSafe,
K: RefUnwindSafe,
M: RefUnwindSafe,
V: RefUnwindSafe,
<M as IntoIterator>::IntoIter: RefUnwindSafe,
F: RefUnwindSafe,
K: RefUnwindSafe,
M: RefUnwindSafe,
V: RefUnwindSafe,
<M as IntoIterator>::IntoIter: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> IoDecodeExt for T where
T: Decode,
[src]
T: Decode,
fn decode_from_read_buf<B>(&mut self, buf: &mut ReadBuf<B>) -> Result<(), Error> where
B: AsRef<[u8]>,
[src]
B: AsRef<[u8]>,
fn decode_exact<R>(&mut self, reader: R) -> Result<Self::Item, Error> where
R: Read,
[src]
R: Read,
impl<T> DecodeExt for T where
T: Decode,
[src]
T: Decode,
fn map<T, F>(self, f: F) -> Map<Self, T, F> where
F: Fn(Self::Item) -> T,
[src]
F: Fn(Self::Item) -> T,
fn try_map<T, E, F>(self, f: F) -> TryMap<Self, T, E, F> where
F: Fn(Self::Item) -> Result<T, E>,
Error: From<E>,
[src]
F: Fn(Self::Item) -> Result<T, E>,
Error: From<E>,
fn map_err<E, F>(self, f: F) -> MapErr<Self, E, F> where
F: Fn(Error) -> E,
Error: From<E>,
[src]
F: Fn(Error) -> E,
Error: From<E>,
fn and_then<D, F>(self, f: F) -> AndThen<Self, D, F> where
D: Decode,
F: Fn(Self::Item) -> D,
[src]
D: Decode,
F: Fn(Self::Item) -> D,
fn collect<T>(self) -> Collect<Self, T> where
T: Extend<Self::Item> + Default,
[src]
T: Extend<Self::Item> + Default,
fn collectn<T>(self, n: usize) -> CollectN<Self, T> where
T: Extend<Self::Item> + Default,
[src]
T: Extend<Self::Item> + Default,
fn length(self, expected_bytes: u64) -> Length<Self>
[src]
fn omit(self, do_omit: bool) -> Omittable<Self>
[src]
fn max_bytes(self, bytes: u64) -> MaxBytes<Self>
[src]
fn chain<T>(self, other: T) -> TupleDecoder<(Self, T)> where
T: Decode,
[src]
T: Decode,