Crate luminal_handler [] [src]

This create wraps hyper::server::Service with a slightly more convenient interface.

The request is wrapped with a new enum that helps provide additional information along with the request and uses a more liberal error type to allow users to map their own error to an actual http response.

Structs

HandlerFn

Holds a function to dispatch to via its impl of Handler<E>.

HandlerService

An impl of hyper::Service that consumes an impl of Handler.

Traits

Handler

Trait for handling a request, returning either a success Response or an error Response.

Functions

handler_fn

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

Type Definitions

LuminalFuture