Struct bytecodec::combinator::MapErr [−][src]
pub struct MapErr<C, E, F> { /* fields omitted */ }
Expand description
Combinator for modifying encoding/decoding errors.
This is created by calling {DecodeExt, EncodeExt}::map_err
method.
Implementations
Trait Implementations
impl<C, E, F> SizedEncode for MapErr<C, E, F> where
C: SizedEncode,
F: Fn(Error) -> E,
Error: From<E>,
impl<C, E, F> SizedEncode for MapErr<C, E, F> where
C: SizedEncode,
F: Fn(Error) -> E,
Error: From<E>,
Returns the exact number of bytes required to encode all the items remaining in the encoder.
Auto Trait Implementations
impl<C, E, F> RefUnwindSafe for MapErr<C, E, F> where
C: RefUnwindSafe,
E: RefUnwindSafe,
F: RefUnwindSafe,
impl<C, E, F> UnwindSafe for MapErr<C, E, F> where
C: UnwindSafe,
E: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Encodes the items remaining in the encoder and writes the encoded bytes to the given write buffer. Read more
Encodes the items remaining in the encoder and
writes the encoded bytes to the given write buffer.
If the write buffer is full and the writing cannot be performed,
the given WriteBuf will memorize cx’s Waker
.
This Waker
’s wake
will later be called when the WriteBuf
regains its free space. Read more