File: README.md

package info (click to toggle)
rust-axum 0.7.9-13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,992 kB
  • sloc: javascript: 26; makefile: 24; sql: 6; sh: 1
file content (16 lines) | stat: -rw-r--r-- 585 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
This example explores 3 different ways you can create custom rejections for
already existing extractors

- [`with_rejection`](src/with_rejection.rs): Uses
  `axum_extra::extract::WithRejection` to transform one rejection into another
- [`derive_from_request`](src/derive_from_request.rs): Uses the
  `axum::extract::FromRequest` derive macro to wrap another extractor and
  customize the rejection
- [`custom_extractor`](src/custom_extractor.rs): Manual implementation of
  `FromRequest` that wraps another extractor

Run with

```sh
cargo run -p example-customize-extractor-error
```