Trait FuncHandler

Source
pub trait FuncHandler<R, W>: Send{
    // Required method
    fn handle<'life0, 'life1, 'async_trait>(
        &'life0 self,
        stream: &'life1 mut IOStream<R, W>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

The basic trait for handler.

Required Methods§

Source

fn handle<'life0, 'life1, 'async_trait>( &'life0 self, stream: &'life1 mut IOStream<R, W>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Define your handler here.

Implementors§