Function luminal_handler::handler_fn [] [src]

pub fn handler_fn<F, E>(func: F) -> HandlerService<HandlerFn<F, E>, E> where
    F: Fn(HttpRequest) -> Result<Response, E>,
    E: IntoResponse

Accepts a function or closure that takes an HttpRequest and returns a compatible Result.