Trait poem::endpoint::Endpoint [−][src]
pub trait Endpoint: Send + Sync {
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;
}
Expand description
An HTTP request handler.
Associated Types
type Output: IntoResponse
type Output: IntoResponse
Represents the response of the endpoint.
Required methods
Implementations on Foreign Types
Implementors
impl<E, F, Fut, Err, R, R2> Endpoint for AndThen<E, F> where
E: Endpoint<Output = Result<R, Err>>,
F: Fn(R) -> Fut + Send + Sync,
Fut: Future<Output = Result<R2, Err>> + Send,
Err: IntoResponse,
R: IntoResponse,
R2: IntoResponse,
impl<E, F, Fut, Err, R, R2> Endpoint for AndThen<E, F> where
E: Endpoint<Output = Result<R, Err>>,
F: Fn(R) -> Fut + Send + Sync,
Fut: Future<Output = Result<R2, Err>> + Send,
Err: IntoResponse,
R: IntoResponse,
R2: IntoResponse,
impl<E, F, Fut, InErr, OutErr, R> Endpoint for MapErr<E, F> where
E: Endpoint<Output = Result<R, InErr>>,
InErr: IntoResponse,
OutErr: IntoResponse,
F: Fn(InErr) -> Fut + Send + Sync,
Fut: Future<Output = OutErr> + Send,
R: IntoResponse,
impl<E, F, Fut, InErr, OutErr, R> Endpoint for MapErr<E, F> where
E: Endpoint<Output = Result<R, InErr>>,
InErr: IntoResponse,
OutErr: IntoResponse,
F: Fn(InErr) -> Fut + Send + Sync,
Fut: Future<Output = OutErr> + Send,
R: IntoResponse,
type Output = R
type Output = R
impl<E: Endpoint> Endpoint for CookieSessionEndpoint<E>
This is supported on crate feature session
only.
impl<E: Endpoint> Endpoint for CookieSessionEndpoint<E>
This is supported on crate feature
session
only.impl<T, E> Endpoint for ServerSessionEndpoint<T, E> where
T: SessionStorage,
E: Endpoint,
This is supported on crate feature session
only.
impl<T, E> Endpoint for ServerSessionEndpoint<T, E> where
T: SessionStorage,
E: Endpoint,
This is supported on crate feature
session
only.