Expand description
Extracts request data into type-safe structs using Serde.
Extractors are added to route definitions when defining a Router
. The PathExtractor
and
QueryStringExtractor
traits provide usage examples.
The request data is extracted by the Route
implementation when dispatching the request. The
application-provided data structure which implements the extractor trait is used to deserialize
the data and store it within the request State
before the request is dispatched to the
Handler
.
Structs
- A
PathExtractor
that does not extract/store any data from theRequest
path. - A
QueryStringExtractor
that does not extract/store any data.
Traits
- Defines a binding for storing the dynamic segments of the
Request
path inState
. On failure theStaticResponseExtender
implementation extends theResponse
to indicate why the extraction process failed. - Defines a binding for storing the query parameters from the
Request
URI inState
. On failure theStaticResponseExtender
implementation extends theResponse
to indicate why the extraction process failed.