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.

Trait Implementations

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

[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.

[src]

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

[src]

Tries to start encoding the given item. Read more

[src]

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

[src]

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

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

[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