Skip to main content

Module extract

Module extract 

Source
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.
CookieJar
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.
PathPrefixOffset
Byte offset into parts.uri.path() where the post-prefix path begins.
Query
Extracts typed query string parameters.
State
Extracts shared application state.

Traits§

FromRequest
Extract a value by consuming the request body.
FromRequestParts
Extract a value from request metadata (URI, headers, extensions).
NamedCookie
Trait for types that extract a specific named cookie.
NamedHeader
Trait for types that can be extracted from a named HTTP header.