Decoder

Trait Decoder 

Source
pub trait Decoder: Send + Sync {
    // Required method
    fn decode<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        read: &'life1 mut OwnedReadHalf,
        src: &'life2 mut [u8],
    ) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait;

    // Provided method
    fn try_decode(
        &mut self,
        _read: &mut OwnedReadHalf,
        _src: &mut [u8],
    ) -> Result<usize, Error> { ... }
}

Required Methods§

Source

fn decode<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, read: &'life1 mut OwnedReadHalf, src: &'life2 mut [u8], ) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Provided Methods§

Source

fn try_decode( &mut self, _read: &mut OwnedReadHalf, _src: &mut [u8], ) -> Result<usize, Error>

Implementors§