extractor
A handler argument that pulls one piece of data out of the request, like the path or the JSON body.
In axum, handler parameters implement FromRequestParts/FromRequest (Path, Query, Json, State); a failed extraction rejects the request with a 4xx response.
Loading interactive…
Examples
async fn one(Path(id): Path<u32>)pullsidfrom/tools/{id}; for/tools/abcaxum rejects the request with400 Bad Requestbefore the handler runs.
See also