Struct tower_http::propagate_header::PropagateHeaderLayer
source · pub struct PropagateHeaderLayer { /* private fields */ }
Available on crate feature
propagate-header
only.Expand description
Layer that applies PropagateHeader
which propagates headers from requests to responses.
If the header is present on the request it’ll be applied to the response as well. This could
for example be used to propagate headers such as X-Request-Id
.
See the module docs for more details.
Implementations§
source§impl PropagateHeaderLayer
impl PropagateHeaderLayer
sourcepub fn new(header: HeaderName) -> Self
pub fn new(header: HeaderName) -> Self
Create a new PropagateHeaderLayer
.
Trait Implementations§
source§impl Clone for PropagateHeaderLayer
impl Clone for PropagateHeaderLayer
source§fn clone(&self) -> PropagateHeaderLayer
fn clone(&self) -> PropagateHeaderLayer
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PropagateHeaderLayer
impl Debug for PropagateHeaderLayer
Auto Trait Implementations§
impl RefUnwindSafe for PropagateHeaderLayer
impl Send for PropagateHeaderLayer
impl Sync for PropagateHeaderLayer
impl Unpin for PropagateHeaderLayer
impl UnwindSafe for PropagateHeaderLayer
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