Skip to main content

Module extract

Module extract 

Source
Expand description

Request extraction.

siderite owns its extractor traits so that every extractor can also document itself for OpenAPI. The describe hooks default to doing nothing, so a custom extractor needs only the extraction method.

Handler arguments are extracted in order; all but the last must implement FromRequestParts. The last may consume the body (FromRequest).

Re-exports§

pub use crate::response::Json;

Structs§

Path
Path parameter extractor (/users/{id}).
Query
Query-string extractor. Each field of T becomes a query parameter.
RawRequest
The raw request, for handlers that need full control (must be last).

Traits§

FromRequest
Extract a value from the whole request, possibly consuming the body.
FromRequestParts
Extract a value from request metadata (method, URI, headers, extensions).

Type Aliases§

Request
An HTTP request with a siderite Body.