[][src]Trait muta_protocol::codec::ProtocolCodec

pub trait ProtocolCodec: Sized + Send + ProtocolCodecSync {
    fn encode<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = ProtocolResult<Bytes>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn decode<'async_trait, B: Into<Bytes> + Send>(
        bytes: B
    ) -> Pin<Box<dyn Future<Output = ProtocolResult<Self>> + Send + 'async_trait>>
    where
        B: 'async_trait,
        Self: 'async_trait
; }

Required methods

fn encode<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = ProtocolResult<Bytes>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

fn decode<'async_trait, B: Into<Bytes> + Send>(
    bytes: B
) -> Pin<Box<dyn Future<Output = ProtocolResult<Self>> + Send + 'async_trait>> where
    B: 'async_trait,
    Self: 'async_trait, 

Loading content...

Implementors

impl<T: ProtocolCodecSync + 'static> ProtocolCodec for T[src]

Loading content...