Skip to main content

TfCodec

Trait TfCodec 

Source
pub trait TfCodec:
    Encoder<Bytes, Error = Error>
    + Decoder<Item = BytesMut, Error = Error>
    + Send
    + Sync
    + Clone
    + 'static {
    // Required method
    fn initial_setup<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        transport: &'life1 mut Transport,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

The additional trait that gaves ability to setup codec per connection.

Required Methods§

Source

fn initial_setup<'life0, 'life1, 'async_trait>( &'life0 mut self, transport: &'life1 mut Transport, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§