Skip to main content

Module extract

Module extract 

Source
Expand description

Typed request extractors (Path, Query, Json, …) for IntoHandler.

Existing async fn(req: Request) handlers keep working. Extractor handlers use separate marker impls so they do not conflict with Fn(Request).

Structs§

Extension
Per-request extension (req.set / req.get).
Form
application/x-www-form-urlencoded (or multipart text fields) into T.
Json
JSON body deserialized into T.
Path
Path parameters deserialized into T (e.g. struct Id { id: String } for /:id).
Query
Query string deserialized into T.
State
Shared app state registered via app.state(T).

Traits§

FromRequest
Extract a value from the request (may read the body).
FromRequestParts
Extract a value from request parts (no body).

Type Aliases§

ExtractFuture
Boxed future tied to the request borrow (body extractors).