Struct async_codec_util::decoder::DecodeExact [] [src]

pub struct DecodeExact<D> { /* fields omitted */ }

Wraps a decoder and emits an error if it does not stop encoding at exactly the specified byte count.

Methods

impl<D> DecodeExact<D>
[src]

[src]

Create a new DecodeExact, delegating to the given dec and checking that it decodes exactly target bytes.

Trait Implementations

impl<D> AsyncDecode for DecodeExact<D> where
    D: AsyncDecode
[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> Send for DecodeExact<D> where
    D: Send

impl<D> Sync for DecodeExact<D> where
    D: Sync