[][src]Trait futures_codec::Decoder

pub trait Decoder {
    type Item;
    type Error: From<Error>;
    fn decode(
        &mut self,
        src: &mut BytesMut
    ) -> Result<Option<Self::Item>, Self::Error>; }

Decoding of frames via buffers, for use with FramedRead.

Associated Types

type Item

The type of items returned by decode

type Error: From<Error>

The type of decoding errors.

Loading content...

Required methods

fn decode(
    &mut self,
    src: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>

Decode an item from the src BytesMut into an item

Loading content...

Implementors

impl Decoder for BytesCodec[src]

type Item = Bytes

type Error = Error

impl Decoder for LengthCodec[src]

type Item = Bytes

type Error = Error

impl Decoder for LinesCodec[src]

type Item = String

type Error = Error

Loading content...