Skip to main content

Decoder

Trait Decoder 

Source
pub trait Decoder {
    type Item;
    type Error;

    // Required method
    fn decode(
        &mut self,
        bytes: &mut BytesMut,
    ) -> Result<Option<Self::Item>, Self::Error>;
}

Required Associated Types§

Required Methods§

Source

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§