mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-29 00:00:18 +02:00
Move TypedHeader to axum-extra (#1850)
Co-authored-by: Michael Scofield <[email protected]> Co-authored-by: Jonas Platte <[email protected]>
This commit is contained in:
co-authored by
Michael Scofield
Jonas Platte
parent
173f9f72b0
commit
877e3fe4de
+17
-7
@@ -72,10 +72,13 @@ use from_request::Trait::{FromRequest, FromRequestParts};
|
||||
/// ```
|
||||
/// use axum_macros::FromRequest;
|
||||
/// use axum::{
|
||||
/// extract::{Extension, TypedHeader},
|
||||
/// headers::ContentType,
|
||||
/// extract::Extension,
|
||||
/// body::Bytes,
|
||||
/// };
|
||||
/// use axum_extra::{
|
||||
/// TypedHeader,
|
||||
/// headers::ContentType,
|
||||
/// };
|
||||
///
|
||||
/// #[derive(FromRequest)]
|
||||
/// struct MyExtractor {
|
||||
@@ -117,10 +120,13 @@ use from_request::Trait::{FromRequest, FromRequestParts};
|
||||
/// ```
|
||||
/// use axum_macros::FromRequest;
|
||||
/// use axum::{
|
||||
/// extract::{Extension, TypedHeader},
|
||||
/// headers::ContentType,
|
||||
/// extract::Extension,
|
||||
/// body::Bytes,
|
||||
/// };
|
||||
/// use axum_extra::{
|
||||
/// TypedHeader,
|
||||
/// headers::ContentType,
|
||||
/// };
|
||||
///
|
||||
/// #[derive(FromRequest)]
|
||||
/// struct MyExtractor {
|
||||
@@ -159,9 +165,10 @@ use from_request::Trait::{FromRequest, FromRequestParts};
|
||||
///
|
||||
/// ```
|
||||
/// use axum_macros::FromRequest;
|
||||
/// use axum::{
|
||||
/// extract::{TypedHeader, rejection::TypedHeaderRejection},
|
||||
/// use axum_extra::{
|
||||
/// TypedHeader,
|
||||
/// headers::{ContentType, UserAgent},
|
||||
/// typed_header::TypedHeaderRejection,
|
||||
/// };
|
||||
///
|
||||
/// #[derive(FromRequest)]
|
||||
@@ -369,7 +376,10 @@ pub fn derive_from_request(item: TokenStream) -> TokenStream {
|
||||
/// ```
|
||||
/// use axum_macros::FromRequestParts;
|
||||
/// use axum::{
|
||||
/// extract::{Query, TypedHeader},
|
||||
/// extract::Query,
|
||||
/// };
|
||||
/// use axum_extra::{
|
||||
/// TypedHeader,
|
||||
/// headers::ContentType,
|
||||
/// };
|
||||
/// use std::collections::HashMap;
|
||||
|
||||
Reference in New Issue
Block a user