Trait poem::Endpoint[][src]

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

An HTTP request handler.

Associated Types

Represents the response of the endpoint.

Required methods

Get the response to the request.

Provided methods

Check if request matches predicate for route selection.

Implementations on Foreign Types

Implementors