pub struct Headers<T>(pub T);
Expand description
Use typed Header
s i a response.
Tuple Fields§
§0: T
Implementations§
Trait Implementations§
Source§impl<T1> IntoResponse for Headers<(T1,)>where
T1: Header,
impl<T1> IntoResponse for Headers<(T1,)>where
T1: Header,
Source§fn into_response(self) -> Response<Body>
fn into_response(self) -> Response<Body>
Create a response.
Source§impl<T1, T2> IntoResponse for Headers<(T1, T2)>
impl<T1, T2> IntoResponse for Headers<(T1, T2)>
Source§fn into_response(self) -> Response<Body>
fn into_response(self) -> Response<Body>
Create a response.
Source§impl<T1, T2, T3> IntoResponse for Headers<(T1, T2, T3)>
impl<T1, T2, T3> IntoResponse for Headers<(T1, T2, T3)>
Source§fn into_response(self) -> Response<Body>
fn into_response(self) -> Response<Body>
Create a response.
Source§impl<T1, T2, T3, T4> IntoResponse for Headers<(T1, T2, T3, T4)>
impl<T1, T2, T3, T4> IntoResponse for Headers<(T1, T2, T3, T4)>
Source§fn into_response(self) -> Response<Body>
fn into_response(self) -> Response<Body>
Create a response.
Source§impl<T1, T2, T3, T4, T5> IntoResponse for Headers<(T1, T2, T3, T4, T5)>
impl<T1, T2, T3, T4, T5> IntoResponse for Headers<(T1, T2, T3, T4, T5)>
Source§fn into_response(self) -> Response<Body>
fn into_response(self) -> Response<Body>
Create a response.
Source§impl<T1, T2, T3, T4, T5, T6> IntoResponse for Headers<(T1, T2, T3, T4, T5, T6)>
impl<T1, T2, T3, T4, T5, T6> IntoResponse for Headers<(T1, T2, T3, T4, T5, T6)>
Source§fn into_response(self) -> Response<Body>
fn into_response(self) -> Response<Body>
Create a response.
Source§impl<T1, T2, T3, T4, T5, T6, T7> IntoResponse for Headers<(T1, T2, T3, T4, T5, T6, T7)>
impl<T1, T2, T3, T4, T5, T6, T7> IntoResponse for Headers<(T1, T2, T3, T4, T5, T6, T7)>
Source§fn into_response(self) -> Response<Body>
fn into_response(self) -> Response<Body>
Create a response.
Source§impl<T1, T2, T3, T4, T5, T6, T7, T8> IntoResponse for Headers<(T1, T2, T3, T4, T5, T6, T7, T8)>
impl<T1, T2, T3, T4, T5, T6, T7, T8> IntoResponse for Headers<(T1, T2, T3, T4, T5, T6, T7, T8)>
Source§fn into_response(self) -> Response<Body>
fn into_response(self) -> Response<Body>
Create a response.
Source§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoResponse for Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9)>
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoResponse for Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9)>
Source§fn into_response(self) -> Response<Body>
fn into_response(self) -> Response<Body>
Create a response.
Source§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoResponse for Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoResponse for Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>
Source§fn into_response(self) -> Response<Body>
fn into_response(self) -> Response<Body>
Create a response.
Source§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoResponse for Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)>
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoResponse for Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)>
Source§fn into_response(self) -> Response<Body>
fn into_response(self) -> Response<Body>
Create a response.
Source§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> IntoResponse for Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)>
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> IntoResponse for Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)>
Source§fn into_response(self) -> Response<Body>
fn into_response(self) -> Response<Body>
Create a response.
Source§impl<T1> IntoResponseParts for Headers<(T1,)>where
T1: Header,
impl<T1> IntoResponseParts for Headers<(T1,)>where
T1: Header,
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of an error. Read more
Source§fn into_response_parts(
self,
res: ResponseParts,
) -> Result<ResponseParts, <Headers<(T1,)> as IntoResponseParts>::Error>
fn into_response_parts( self, res: ResponseParts, ) -> Result<ResponseParts, <Headers<(T1,)> as IntoResponseParts>::Error>
Set parts of the response
Source§impl<T1, T2> IntoResponseParts for Headers<(T1, T2)>
impl<T1, T2> IntoResponseParts for Headers<(T1, T2)>
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of an error. Read more
Source§fn into_response_parts(
self,
res: ResponseParts,
) -> Result<ResponseParts, <Headers<(T1, T2)> as IntoResponseParts>::Error>
fn into_response_parts( self, res: ResponseParts, ) -> Result<ResponseParts, <Headers<(T1, T2)> as IntoResponseParts>::Error>
Set parts of the response
Source§impl<T1, T2, T3> IntoResponseParts for Headers<(T1, T2, T3)>
impl<T1, T2, T3> IntoResponseParts for Headers<(T1, T2, T3)>
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of an error. Read more
Source§fn into_response_parts(
self,
res: ResponseParts,
) -> Result<ResponseParts, <Headers<(T1, T2, T3)> as IntoResponseParts>::Error>
fn into_response_parts( self, res: ResponseParts, ) -> Result<ResponseParts, <Headers<(T1, T2, T3)> as IntoResponseParts>::Error>
Set parts of the response
Source§impl<T1, T2, T3, T4> IntoResponseParts for Headers<(T1, T2, T3, T4)>
impl<T1, T2, T3, T4> IntoResponseParts for Headers<(T1, T2, T3, T4)>
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of an error. Read more
Source§fn into_response_parts(
self,
res: ResponseParts,
) -> Result<ResponseParts, <Headers<(T1, T2, T3, T4)> as IntoResponseParts>::Error>
fn into_response_parts( self, res: ResponseParts, ) -> Result<ResponseParts, <Headers<(T1, T2, T3, T4)> as IntoResponseParts>::Error>
Set parts of the response
Source§impl<T1, T2, T3, T4, T5> IntoResponseParts for Headers<(T1, T2, T3, T4, T5)>
impl<T1, T2, T3, T4, T5> IntoResponseParts for Headers<(T1, T2, T3, T4, T5)>
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of an error. Read more
Source§fn into_response_parts(
self,
res: ResponseParts,
) -> Result<ResponseParts, <Headers<(T1, T2, T3, T4, T5)> as IntoResponseParts>::Error>
fn into_response_parts( self, res: ResponseParts, ) -> Result<ResponseParts, <Headers<(T1, T2, T3, T4, T5)> as IntoResponseParts>::Error>
Set parts of the response
Source§impl<T1, T2, T3, T4, T5, T6> IntoResponseParts for Headers<(T1, T2, T3, T4, T5, T6)>
impl<T1, T2, T3, T4, T5, T6> IntoResponseParts for Headers<(T1, T2, T3, T4, T5, T6)>
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of an error. Read more
Source§fn into_response_parts(
self,
res: ResponseParts,
) -> Result<ResponseParts, <Headers<(T1, T2, T3, T4, T5, T6)> as IntoResponseParts>::Error>
fn into_response_parts( self, res: ResponseParts, ) -> Result<ResponseParts, <Headers<(T1, T2, T3, T4, T5, T6)> as IntoResponseParts>::Error>
Set parts of the response
Source§impl<T1, T2, T3, T4, T5, T6, T7> IntoResponseParts for Headers<(T1, T2, T3, T4, T5, T6, T7)>
impl<T1, T2, T3, T4, T5, T6, T7> IntoResponseParts for Headers<(T1, T2, T3, T4, T5, T6, T7)>
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of an error. Read more
Source§fn into_response_parts(
self,
res: ResponseParts,
) -> Result<ResponseParts, <Headers<(T1, T2, T3, T4, T5, T6, T7)> as IntoResponseParts>::Error>
fn into_response_parts( self, res: ResponseParts, ) -> Result<ResponseParts, <Headers<(T1, T2, T3, T4, T5, T6, T7)> as IntoResponseParts>::Error>
Set parts of the response
Source§impl<T1, T2, T3, T4, T5, T6, T7, T8> IntoResponseParts for Headers<(T1, T2, T3, T4, T5, T6, T7, T8)>
impl<T1, T2, T3, T4, T5, T6, T7, T8> IntoResponseParts for Headers<(T1, T2, T3, T4, T5, T6, T7, T8)>
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of an error. Read more
Source§fn into_response_parts(
self,
res: ResponseParts,
) -> Result<ResponseParts, <Headers<(T1, T2, T3, T4, T5, T6, T7, T8)> as IntoResponseParts>::Error>
fn into_response_parts( self, res: ResponseParts, ) -> Result<ResponseParts, <Headers<(T1, T2, T3, T4, T5, T6, T7, T8)> as IntoResponseParts>::Error>
Set parts of the response
Source§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoResponseParts for Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9)>
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9> IntoResponseParts for Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9)>
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of an error. Read more
Source§fn into_response_parts(
self,
res: ResponseParts,
) -> Result<ResponseParts, <Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9)> as IntoResponseParts>::Error>
fn into_response_parts( self, res: ResponseParts, ) -> Result<ResponseParts, <Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9)> as IntoResponseParts>::Error>
Set parts of the response
Source§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoResponseParts for Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> IntoResponseParts for Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of an error. Read more
Source§fn into_response_parts(
self,
res: ResponseParts,
) -> Result<ResponseParts, <Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> as IntoResponseParts>::Error>
fn into_response_parts( self, res: ResponseParts, ) -> Result<ResponseParts, <Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> as IntoResponseParts>::Error>
Set parts of the response
Source§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoResponseParts for Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)>
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> IntoResponseParts for Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)>
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of an error. Read more
Source§fn into_response_parts(
self,
res: ResponseParts,
) -> Result<ResponseParts, <Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> as IntoResponseParts>::Error>
fn into_response_parts( self, res: ResponseParts, ) -> Result<ResponseParts, <Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> as IntoResponseParts>::Error>
Set parts of the response
Source§impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> IntoResponseParts for Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)>
impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> IntoResponseParts for Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)>
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of an error. Read more
Source§fn into_response_parts(
self,
res: ResponseParts,
) -> Result<ResponseParts, <Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> as IntoResponseParts>::Error>
fn into_response_parts( self, res: ResponseParts, ) -> Result<ResponseParts, <Headers<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> as IntoResponseParts>::Error>
Set parts of the response
Auto Trait Implementations§
impl<T> Freeze for Headers<T>where
T: Freeze,
impl<T> RefUnwindSafe for Headers<T>where
T: RefUnwindSafe,
impl<T> Send for Headers<T>where
T: Send,
impl<T> Sync for Headers<T>where
T: Sync,
impl<T> Unpin for Headers<T>where
T: Unpin,
impl<T> UnwindSafe for Headers<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more