Trait actix_web::dev::Handler
[−]
[src]
pub trait Handler<S>: 'static {
type Result: Responder;
fn handle(&mut self, req: HttpRequest<S>) -> Self::Result;
}Trait defines object that could be registered as route handler
Associated Types
Required Methods
fn handle(&mut self, req: HttpRequest<S>) -> Self::Result
Handle request
Implementors
impl<F, R, S> Handler<S> for F where
F: Fn(HttpRequest<S>) -> R + 'static,
R: Responder + 'static, type Result = R;impl<S> Handler<S> for NormalizePath type Result = HttpResponse;impl<S: 'static> Handler<S> for StaticFiles<S> type Result = Result<AsyncResult<HttpResponse>, Error>;