Skip to main content

Module handler

Module handler 

Source
Expand description

The Handler trait — connects async functions to HTTP routes via extractors.

Handler is implemented for async functions of arities 0–16 via macro. Each function argument must implement FromRequestParts (metadata extractors) or FromRequest (body extractor, last argument only).

Structs§

WithBody
Marker type to distinguish “parts extractors + body extractor” from “all parts extractors” in Handler impls.

Traits§

Handler
A handler that can process an HTTP request and produce a response.

Functions§

into_boxed_handler
Erase a handler’s type for storage in the router.

Type Aliases§

BoxedHandler
A type-erased handler stored in the router.
ResponseFuture
A pinned, boxed future producing an HTTP response.