Struct tower_http::set_header::SetRequestHeaderLayer
source · [−]pub struct SetRequestHeaderLayer<M, T> { /* private fields */ }
set-header
only.Expand description
Layer that applies SetRequestHeader
which adds a request header.
See SetRequestHeader
for more details.
Implementations
Create a new SetRequestHeaderLayer
.
If a previous value exists for the same header, it is removed and replaced with the new header value.
Create a new SetRequestHeaderLayer
.
The new header is always added, preserving any existing values. If previous values exist, the header will have multiple values.
Create a new SetRequestHeaderLayer
.
If a previous value exists for the header, the new value is not inserted.
Trait Implementations
Auto Trait Implementations
impl<M, T> RefUnwindSafe for SetRequestHeaderLayer<M, T> where
M: RefUnwindSafe,
impl<M, T> Send for SetRequestHeaderLayer<M, T> where
M: Send,
impl<M, T> Sync for SetRequestHeaderLayer<M, T> where
M: Sync,
impl<M, T> Unpin for SetRequestHeaderLayer<M, T> where
M: Unpin,
impl<M, T> UnwindSafe for SetRequestHeaderLayer<M, T> where
M: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
follow-redirect
only.Create a new Policy
that returns Action::Follow
only if self
and other
return
Action::Follow
. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more