Struct bytecodec::combinator::MapFrom[][src]

pub struct MapFrom<E, T, F> { /* fields omitted */ }

Combinator for converting items into ones that suited to the inner encoder by calling the given function.

This is created by calling EncodeExt::map_from method.

Methods

impl<E, T, F> MapFrom<E, T, F>
[src]

Important traits for &'a mut R

Returns a reference to the inner encoder.

Important traits for &'a mut R

Returns a mutable reference to the inner encoder.

Takes ownership of this instance and returns the inner encoder.

Trait Implementations

impl<E: Debug, T: Debug, F: Debug> Debug for MapFrom<E, T, F>
[src]

Formats the value using the given formatter. Read more

impl<E, T, F> Encode for MapFrom<E, T, F> where
    E: Encode,
    F: Fn(T) -> E::Item
[src]

The type of items to be encoded.

Encodes the items in the encoder and writes the encoded bytes to the given buffer. Read more

Tries to start encoding the given item. Read more

Returns the number of bytes required to encode all the items in the encoder. Read more

Returns true if there are no items to be encoded in the encoder, otherwise false. Read more

impl<E, T, F> SizedEncode for MapFrom<E, T, F> where
    E: SizedEncode,
    F: Fn(T) -> E::Item
[src]

Returns the exact number of bytes required to encode all the items remaining in the encoder.

Auto Trait Implementations

impl<E, T, F> Send for MapFrom<E, T, F> where
    E: Send,
    F: Send,
    T: Send

impl<E, T, F> Sync for MapFrom<E, T, F> where
    E: Sync,
    F: Sync,
    T: Sync