Struct bytecodec::combinator::Map
[−]
[src]
pub struct Map<D, T, F> { /* fields omitted */ }Combinator for converting decoded items to other values.
This is created by calling DecodeExt::map method.
Trait Implementations
impl<D: Debug, T: Debug, F: Debug> Debug for Map<D, T, F>[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl<D, T, F> Decode for Map<D, T, F> where
D: Decode,
F: Fn(D::Item) -> T, [src]
D: Decode,
F: Fn(D::Item) -> T,
type Item = T
The type of items to be decoded.
fn decode(
&mut self,
buf: &[u8],
eos: Eos
) -> Result<(usize, Option<Self::Item>)>[src]
&mut self,
buf: &[u8],
eos: Eos
) -> Result<(usize, Option<Self::Item>)>
Consumes the given buffer (a part of a byte sequence), and decodes an item from it. 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