mirror of
https://github.com/tokio-rs/axum.git
synced 2024-11-22 07:08:16 +01:00
a7d8954178
* Use RequestPartsExt more in docs / examples * Remove unused import |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |
This example explores 3 different ways you can create custom rejections for already existing extractors
with_rejection
: Usesaxum_extra::extract::WithRejection
to transform one rejection into anotherderive_from_request
: Usesaxum_macros::FromRequest
to wrap another extractor and customize the rejectioncustom_extractor
: Manual implementation ofFromRequest
that wraps another extractor
Run with
cd examples && cargo run -p example-customize-extractor-error