Struct bytecodec::combinator::TryMapFrom [−][src]
pub struct TryMapFrom<C, T, E, F> { /* fields omitted */ }
Expand description
Combinator that tries to convert items into ones that suited to the inner encoder by calling the given function.
This is created by calling EncodeExt::try_map_from
method.
Implementations
Trait Implementations
impl<C, T, E, F> SizedEncode for TryMapFrom<C, T, E, F> where
C: SizedEncode,
F: Fn(T) -> Result<C::Item, E>,
Error: From<E>,
impl<C, T, E, F> SizedEncode for TryMapFrom<C, T, E, F> where
C: SizedEncode,
F: Fn(T) -> Result<C::Item, 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, T, E, F> RefUnwindSafe for TryMapFrom<C, T, E, F> where
C: RefUnwindSafe,
E: RefUnwindSafe,
F: RefUnwindSafe,
T: RefUnwindSafe,
impl<C, T, E, F> UnwindSafe for TryMapFrom<C, T, E, F> where
C: UnwindSafe,
E: UnwindSafe,
F: UnwindSafe,
T: 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