axum/axum-macros/tests/from_request/fail/enum_rejection_derive.rs
David Pedersen 852e548e19
Support #[derive(FromRequest)] on enums (#1009)
* Support `#[from_request(via(...))]` on enums

* Check `#[from_request]` on variants

* check for non enum/struct and clean up

* changelog

* changelog

* remove needless feature

* changelog ref
2022-05-08 20:04:56 +02:00

7 lines
135 B
Rust

use axum_macros::FromRequest;
#[derive(FromRequest, Clone)]
#[from_request(rejection_derive(!Error))]
enum Extractor {}
fn main() {}