Skip to main content

ProtocolHandler

Trait ProtocolHandler 

Source
pub trait ProtocolHandler: Send + Sync {
    // Required methods
    fn alpns(&self) -> Vec<String>;
    fn accept<'life0, 'async_trait>(
        &'life0 self,
        ctx: Context,
        conn: Connection,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn alpns(&self) -> Vec<String>

Source

fn accept<'life0, 'async_trait>( &'life0 self, ctx: Context, conn: Connection, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

Source§

impl<T> ProtocolHandler for T
where T: Server<Error = Error> + Clone + 'static,