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 more