Trait poem::endpoint::Endpoint[][src]

pub trait Endpoint: Send + Sync + 'static {
    fn call<'life0, 'async_trait>(
        &'life0 self,
        req: Request
    ) -> Pin<Box<dyn Future<Output = Response> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn check(&self, req: &Request) -> bool { ... } }
Expand description

An HTTP request handler.

Required methods

Get the response to the request.

Provided methods

Check if request matches predicate for route selection.

Implementations on Foreign Types

Implementors