[][src]Module humblegen_rt::server

GEN Generic parts of the humblegen HTTP service server implementation, based on hyper.

Structs

Route

A route associates an HTTP method + URL path regex with a DispatcherClosure. It implements regexset_map::Entry and only makes sense within a Service.

Service

A service is a collection of Routes that share a common prefix.

Functions

handle_request

The routine that maps an incoming hyper request to a service in services, and invokes the service's dispatcher.

handle_request_impl
handler_response_to_hyper_response

Conversion of a HandlerResponse to a hyper response. Invoked from generated code within a DispatcherClosure.

listen_and_run_forever

Serve services via HTTP, binding to the given addr. Invokes handle_request.