[][src]Trait muta_protocol::traits::MessageCodec

pub trait MessageCodec: Sized + Send + Debug + 'static {
    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>(
        bytes: Bytes
    ) -> Pin<Box<dyn Future<Output = ProtocolResult<Self>> + Send + 'async_trait>>
    where
        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>(
    bytes: Bytes
) -> Pin<Box<dyn Future<Output = ProtocolResult<Self>> + Send + 'async_trait>> where
    Self: 'async_trait, 

Loading content...

Implementors

impl<T> MessageCodec for T where
    T: Serialize + for<'a> Deserialize<'a> + Send + Debug + 'static, 
[src]

Loading content...