HttpHandler

Trait HttpHandler 

Source
pub trait HttpHandler<D: CustomContextData>:
    Clone
    + Send
    + Sync
    + 'static {
    // Provided methods
    fn handle_request<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _ctx: &'life1 mut HttpContext<D>,
        req: Request<Body>,
    ) -> Pin<Box<dyn Future<Output = RequestOrResponse> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn handle_response<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _ctx: &'life1 mut HttpContext<D>,
        res: Response<Body>,
    ) -> Pin<Box<dyn Future<Output = Response<Body>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}

Provided Methods§

Source

fn handle_request<'life0, 'life1, 'async_trait>( &'life0 self, _ctx: &'life1 mut HttpContext<D>, req: Request<Body>, ) -> Pin<Box<dyn Future<Output = RequestOrResponse> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn handle_response<'life0, 'life1, 'async_trait>( &'life0 self, _ctx: &'life1 mut HttpContext<D>, res: Response<Body>, ) -> Pin<Box<dyn Future<Output = Response<Body>> + 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§