mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-29 00:00:18 +02:00
Support opt-out of extra derived traits for rejections for #[derive(FromRequest)] (#729)
* Handle structs without fields * Support opt-out of derived rejection traits * Handle duplicate opt outs * Improve error if opting out of `Display` or `Debug` but not `Error` * document `rejection_derive` * Handle using both `via` and `rejection_derive` * don't derive debug for `RejectionDeriveOptOuts` * Update axum-macros/src/from_request.rs Co-authored-by: Jonas Platte <[email protected]> Co-authored-by: Jonas Platte <[email protected]>
This commit is contained in:
co-authored by
Jonas Platte
parent
f6fc5ed80c
commit
911c4a788e
@@ -0,0 +1,12 @@
|
||||
use axum_macros::FromRequest;
|
||||
|
||||
#[derive(FromRequest)]
|
||||
struct Extractor();
|
||||
|
||||
fn assert_from_request()
|
||||
where
|
||||
Extractor: axum::extract::FromRequest<axum::body::Body, Rejection = std::convert::Infallible>,
|
||||
{
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
Reference in New Issue
Block a user