pub struct SetRequestIdLayer<M> { /* private fields */ }
Available on crate feature
request-id
only.Expand description
Set request id headers and extensions on requests.
This layer applies the SetRequestId
middleware.
See the module docs and SetRequestId
for more details.
Implementations§
Source§impl<M> SetRequestIdLayer<M>
impl<M> SetRequestIdLayer<M>
Sourcepub fn new(header_name: HeaderName, make_request_id: M) -> Selfwhere
M: MakeRequestId,
pub fn new(header_name: HeaderName, make_request_id: M) -> Selfwhere
M: MakeRequestId,
Create a new SetRequestIdLayer
.
Sourcepub fn x_request_id(make_request_id: M) -> Selfwhere
M: MakeRequestId,
pub fn x_request_id(make_request_id: M) -> Selfwhere
M: MakeRequestId,
Create a new SetRequestIdLayer
that uses x-request-id
as the header name.
Trait Implementations§
Source§impl<M: Clone> Clone for SetRequestIdLayer<M>
impl<M: Clone> Clone for SetRequestIdLayer<M>
Source§fn clone(&self) -> SetRequestIdLayer<M>
fn clone(&self) -> SetRequestIdLayer<M>
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<M: Debug> Debug for SetRequestIdLayer<M>
impl<M: Debug> Debug for SetRequestIdLayer<M>
Source§impl<S, M> Layer<S> for SetRequestIdLayer<M>where
M: Clone + MakeRequestId,
impl<S, M> Layer<S> for SetRequestIdLayer<M>where
M: Clone + MakeRequestId,
Auto Trait Implementations§
impl<M> !Freeze for SetRequestIdLayer<M>
impl<M> RefUnwindSafe for SetRequestIdLayer<M>where
M: RefUnwindSafe,
impl<M> Send for SetRequestIdLayer<M>where
M: Send,
impl<M> Sync for SetRequestIdLayer<M>where
M: Sync,
impl<M> Unpin for SetRequestIdLayer<M>where
M: Unpin,
impl<M> UnwindSafe for SetRequestIdLayer<M>where
M: 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