Expand description
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§
- Handler
Fn - Holds a function to dispatch to via its impl of
Handler<E>. - Handler
Service - An impl of
hyper::Servicethat consumes an impl ofHandler.
Traits§
- Handler
- Trait for handling a request, returning either a success
Responseor an errorResponse.
Functions§
- handler_
fn - Accepts a function or closure that takes an
HttpRequestand returns a compatibleResult.