[][src]Trait async_codec_lite::Encoder

pub trait Encoder {
    type Item;
    type Error: Error + 'static;
    pub fn encode(
        &mut self,
        item: Self::Item,
        dst: &mut BytesMut
    ) -> Result<(), Self::Error>; }

Associated Types

type Item[src]

type Error: Error + 'static[src]

Loading content...

Required methods

pub fn encode(
    &mut self,
    item: Self::Item,
    dst: &mut BytesMut
) -> Result<(), Self::Error>
[src]

Loading content...

Implementors

impl Encoder for BytesCodec[src]

type Error = Infallible

type Item = Bytes

impl Encoder for LinesCodec[src]

type Error = Infallible

type Item = String

impl<C> Encoder for LimitCodec<C> where
    C: Encoder + DecoderWithSkipAhead
[src]

type Error = LimitError<<C as Encoder>::Error>

type Item = <C as Encoder>::Item

impl<Enc, Dec> Encoder for CborCodec<Enc, Dec> where
    Enc: Serialize + 'static, 
[src]

type Error = Error

type Item = Enc

impl<Enc, Dec> Encoder for JsonCodec<Enc, Dec> where
    Enc: Serialize + 'static, 
[src]

type Error = Error

type Item = Enc

impl<L: Length> Encoder for LengthCodec<L>[src]

type Error = OverflowError

type Item = Bytes

Loading content...