Handler

Trait Handler 

Source
pub trait Handler:
    Send
    + Sync
    + 'static {
    // Required method
    fn invoke<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Response<Body>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

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

Implementors§

Source§

impl<F, Fut> Handler for F
where F: Fn() -> Fut + Send + Sync + 'static, Fut: Future + Send + 'static, Fut::Output: IntoResponse,