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

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

Combinator for modifying encoding/decoding errors.

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

Methods

impl<C, E, F> MapErr<C, E, F>
[src]

Important traits for &'a mut W
[src]

Returns a reference to the inner encoder or decoder.

Important traits for &'a mut W
[src]

Returns a mutable reference to the inner encoder or decoder.

[src]

Takes ownership of this instance and returns the inner encoder or decoder.

Trait Implementations

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

[src]

Formats the value using the given formatter. Read more

impl<D, E, F> Decode for MapErr<D, E, F> 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 proceeds the decoding process. Read more

[src]

Finishes the current decoding process and returns the decoded item. Read more

[src]

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

[src]

Returns true if there are no items to be decoded by the decoder at the next invocation of decode method, otherwise false. Read more

impl<C, E, F> Encode for MapErr<C, E, F> 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. Read more

impl<C, E, F> SizedEncode for MapErr<C, E, F> where
    C: SizedEncode,
    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, E, F> Send for MapErr<C, E, F> where
    C: Send,
    E: Send,
    F: Send

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