Struct tower_http::request_id::PropagateRequestIdLayer
source · pub struct PropagateRequestIdLayer { /* private fields */ }
Available on crate feature
request-id
only.Expand description
Propagate request ids from requests to responses.
This layer applies the PropagateRequestId
middleware.
See the module docs and PropagateRequestId
for more details.
Implementations§
source§impl PropagateRequestIdLayer
impl PropagateRequestIdLayer
sourcepub fn new(header_name: HeaderName) -> Self
pub fn new(header_name: HeaderName) -> Self
Create a new PropagateRequestIdLayer
.
sourcepub fn x_request_id() -> Self
pub fn x_request_id() -> Self
Create a new PropagateRequestIdLayer
that uses x-request-id
as the header name.
Trait Implementations§
source§impl Clone for PropagateRequestIdLayer
impl Clone for PropagateRequestIdLayer
source§fn clone(&self) -> PropagateRequestIdLayer
fn clone(&self) -> PropagateRequestIdLayer
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 PropagateRequestIdLayer
impl Debug for PropagateRequestIdLayer
Auto Trait Implementations§
impl RefUnwindSafe for PropagateRequestIdLayer
impl Send for PropagateRequestIdLayer
impl Sync for PropagateRequestIdLayer
impl Unpin for PropagateRequestIdLayer
impl UnwindSafe for PropagateRequestIdLayer
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