Struct async_codec_util::decoder::Map [] [src]

pub struct Map<D, F> { /* fields omitted */ }

Change the return type of a decoder by mapping its item through a function.

Methods

impl<D, F> Map<D, F>
[src]

[src]

Chain a compution on the result of a decoder.

Trait Implementations

impl<D, F, U> AsyncDecode for Map<D, F> where
    D: AsyncDecode,
    F: FnOnce(D::Item) -> U, 
[src]

The type of the value to decode.

An error indicating how decoding can fail.

[src]

Call reader.poll_read exactly once, propgating any Err and Pending, and return how many bytes have been read, as well as the decoded value, once decoding is done. Read more

Auto Trait Implementations

impl<D, F> Send for Map<D, F> where
    D: Send,
    F: Send

impl<D, F> Sync for Map<D, F> where
    D: Sync,
    F: Sync