[−][src]Trait saphir::handler::Handler
Define a Handler of a potential http request
Implementing this trait on any type will allow the router to route request
towards it. Implemented by default on Controllers and on any async fn(Request<Body>) -> impl Responder
Associated Types
type Responder: Responder
Responder returned by the handler
type Future: Future<Output = Self::Responder>
Specific future returning the responder
Required methods
fn handle(&self, req: Request<T>) -> Self::Future
Handle the http request, returning a future of a responder
Implementors
impl<T, Fun, Fut, R> Handler<T> for Fun where
Fun: Fn(Request<T>) -> Fut,
Fut: 'static + Future<Output = R> + Send,
R: Responder,
[src]
Fun: Fn(Request<T>) -> Fut,
Fut: 'static + Future<Output = R> + Send,
R: Responder,