@@ -106,16 +106,17 @@ fn impl_struct_by_extracting_each_field(
106
106
Ok ( quote ! {
107
107
#[ :: axum:: async_trait]
108
108
#[ automatically_derived]
109
- impl <B > :: axum:: extract:: FromRequest <B > for #ident
109
+ impl <S , B > :: axum:: extract:: FromRequest <S , B > for #ident
110
110
where
111
111
B : :: axum:: body:: HttpBody + :: std:: marker:: Send + ' static ,
112
112
B :: Data : :: std:: marker:: Send ,
113
113
B :: Error : :: std:: convert:: Into <:: axum:: BoxError >,
114
+ S : Send ,
114
115
{
115
116
type Rejection = #rejection_ident;
116
117
117
118
async fn from_request(
118
- req: & mut :: axum:: extract:: RequestParts <B >,
119
+ req: & mut :: axum:: extract:: RequestParts <S , B >,
119
120
) -> :: std:: result:: Result <Self , Self :: Rejection > {
120
121
:: std:: result:: Result :: Ok ( Self {
121
122
#( #extract_fields) *
@@ -301,7 +302,7 @@ fn extract_each_field_rejection(
301
302
302
303
Ok ( quote_spanned ! { ty_span=>
303
304
#[ allow( non_camel_case_types) ]
304
- #variant_name( <#extractor_ty as :: axum:: extract:: FromRequest <:: axum:: body:: Body >>:: Rejection ) ,
305
+ #variant_name( <#extractor_ty as :: axum:: extract:: FromRequest <S , :: axum:: body:: Body >>:: Rejection ) ,
305
306
} )
306
307
} )
307
308
. collect :: < syn:: Result < Vec < _ > > > ( ) ?;
@@ -485,18 +486,19 @@ fn impl_struct_by_extracting_all_at_once(
485
486
Ok ( quote_spanned ! { path_span=>
486
487
#[ :: axum:: async_trait]
487
488
#[ automatically_derived]
488
- impl <B > :: axum:: extract:: FromRequest <B > for #ident
489
+ impl <S , B > :: axum:: extract:: FromRequest <S , B > for #ident
489
490
where
490
491
B : :: axum:: body:: HttpBody + :: std:: marker:: Send + ' static ,
491
492
B :: Data : :: std:: marker:: Send ,
492
493
B :: Error : :: std:: convert:: Into <:: axum:: BoxError >,
494
+ S : Send ,
493
495
{
494
- type Rejection = <#path<Self > as :: axum:: extract:: FromRequest <B >>:: Rejection ;
496
+ type Rejection = <#path<Self > as :: axum:: extract:: FromRequest <S , B >>:: Rejection ;
495
497
496
498
async fn from_request(
497
- req: & mut :: axum:: extract:: RequestParts <B >,
499
+ req: & mut :: axum:: extract:: RequestParts <S , B >,
498
500
) -> :: std:: result:: Result <Self , Self :: Rejection > {
499
- :: axum:: extract:: FromRequest :: <B >:: from_request( req)
501
+ :: axum:: extract:: FromRequest :: <S , B >:: from_request( req)
500
502
. await
501
503
. map( |#path( inner) | inner)
502
504
}
@@ -540,18 +542,19 @@ fn impl_enum_by_extracting_all_at_once(
540
542
Ok ( quote_spanned ! { path_span=>
541
543
#[ :: axum:: async_trait]
542
544
#[ automatically_derived]
543
- impl <B > :: axum:: extract:: FromRequest <B > for #ident
545
+ impl <S , B > :: axum:: extract:: FromRequest <S , B > for #ident
544
546
where
545
547
B : :: axum:: body:: HttpBody + :: std:: marker:: Send + ' static ,
546
548
B :: Data : :: std:: marker:: Send ,
547
549
B :: Error : :: std:: convert:: Into <:: axum:: BoxError >,
550
+ S : Send ,
548
551
{
549
- type Rejection = <#path<Self > as :: axum:: extract:: FromRequest <B >>:: Rejection ;
552
+ type Rejection = <#path<Self > as :: axum:: extract:: FromRequest <S , B >>:: Rejection ;
550
553
551
554
async fn from_request(
552
- req: & mut :: axum:: extract:: RequestParts <B >,
555
+ req: & mut :: axum:: extract:: RequestParts <S , B >,
553
556
) -> :: std:: result:: Result <Self , Self :: Rejection > {
554
- :: axum:: extract:: FromRequest :: <B >:: from_request( req)
557
+ :: axum:: extract:: FromRequest :: <S , B >:: from_request( req)
555
558
. await
556
559
. map( |#path( inner) | inner)
557
560
}
0 commit comments