Trait hypers::Handler

source ·
pub trait Handler: Send + Sync + 'static {
    // Required method
    fn handle<'life0, 'async_trait>(
        &'life0 self,
        req: Request
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

source

fn handle<'life0, 'async_trait>( &'life0 self, req: Request ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

source§

impl Handler for Router

source§

impl<R, Fut, F> Handler for Fwhere R: Responder + 'static + Send, Fut: Future<Output = R> + Send + 'static, F: Fn(Request) -> Fut + Sync + Send + 'static,