[][src]Trait actix_web::dev::Handler

pub trait Handler<S>: 'static {
    type Result: Responder;
    fn handle(&self, req: &HttpRequest<S>) -> Self::Result;
}

Trait defines object that could be registered as route handler

Associated Types

type Result: Responder

The type of value that handler will return.

Loading content...

Required methods

fn handle(&self, req: &HttpRequest<S>) -> Self::Result

Handle request

Loading content...

Implementors

impl<F, R, S> Handler<S> for F where
    F: Fn(&HttpRequest<S>) -> R + 'static,
    R: Responder + 'static, 
[src]

Handler for Fn()

type Result = R

impl<S> Handler<S> for NormalizePath[src]

type Result = HttpResponse

impl<S: 'static, C: 'static + StaticFileConfig> Handler<S> for StaticFiles<S, C>[src]

Loading content...