Expand description
Request extraction traits and built-in extractors.
Extractors pull typed data from incoming HTTP requests. Each handler
argument is an extractor that implements FromRequestParts (for
metadata like path captures, headers, query strings) or FromRequest
(for the request body).
Structs§
- Cookie
- Extracts a single cookie by name.
- Cookie
Jar - Extracts all cookies as a key-value map.
- Extension
- Extracts a value from request extensions.
- Header
- Extracts a single header value by name.
- Path
- Extracts typed path captures from the URL.
- Path
Prefix Offset - Byte offset into
parts.uri.path()where the post-prefix path begins. - Query
- Extracts typed query string parameters.
- State
- Extracts shared application state.
Traits§
- From
Request - Extract a value by consuming the request body.
- From
Request Parts - Extract a value from request metadata (URI, headers, extensions).
- Named
Cookie - Trait for types that extract a specific named cookie.
- Named
Header - Trait for types that can be extracted from a named HTTP header.