Struct bytecodec::combinator::MapErr [] [src]

pub struct MapErr<C, F, E> { /* fields omitted */ }

Combinator for modifying encoding/decoding errors.

This is created by calling {DecodeExt, EncodeExt}::map_err method.

Trait Implementations

impl<C: Debug, F: Debug, E: Debug> Debug for MapErr<C, F, E>
[src]

[src]

Formats the value using the given formatter. Read more

impl<D, F, E> Decode for MapErr<D, F, E> where
    D: Decode,
    F: Fn(Error) -> E,
    Error: From<E>, 
[src]

The type of items to be decoded.

[src]

Consumes the given buffer (a part of a byte sequence), and decodes an item from it. Read more

[src]

Returns the lower bound of the number of bytes needed to decode the next item. Read more

impl<C, F, E> Encode for MapErr<C, F, E> where
    C: Encode,
    F: Fn(Error) -> E,
    Error: From<E>, 
[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<C, F, E> ExactBytesEncode for MapErr<C, F, E> where
    C: ExactBytesEncode,
    F: Fn(Error) -> E,
    Error: From<E>, 
[src]

[src]

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

Auto Trait Implementations

impl<C, F, E> Send for MapErr<C, F, E> where
    C: Send,
    E: Send,
    F: Send

impl<C, F, E> Sync for MapErr<C, F, E> where
    C: Sync,
    E: Sync,
    F: Sync