pub struct ClientRequestIdPolicy(/* private fields */);Expand description
Adds a x-ms-client-request-id (or custom) header to each request.
Clients can set a custom name by adding ClientRequestIdPolicy::with_header_name()
to ClientOptions::per_call_policies.
The default policy will not be added if a custom one has already been added.
Implementations§
Source§impl ClientRequestIdPolicy
impl ClientRequestIdPolicy
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new policy using the default x-ms-client-request-id header.
Sourcepub const fn with_header_name(header: &'static str) -> Self
pub const fn with_header_name(header: &'static str) -> Self
Creates a new policy using a custom header name.
You can construct a new policy for a constant or static variable.
Trait Implementations§
Source§impl Debug for ClientRequestIdPolicy
impl Debug for ClientRequestIdPolicy
Source§impl Default for ClientRequestIdPolicy
impl Default for ClientRequestIdPolicy
Source§impl From<HeaderName> for ClientRequestIdPolicy
impl From<HeaderName> for ClientRequestIdPolicy
Source§fn from(header_name: HeaderName) -> Self
fn from(header_name: HeaderName) -> Self
Converts to this type from the input type.
Source§impl Policy for ClientRequestIdPolicy
impl Policy for ClientRequestIdPolicy
Source§fn send<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 Context<'_>,
request: &'life2 mut Request,
next: &'life3 [Arc<dyn Policy>],
) -> Pin<Box<dyn Future<Output = PolicyResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn send<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 Context<'_>,
request: &'life2 mut Request,
next: &'life3 [Arc<dyn Policy>],
) -> Pin<Box<dyn Future<Output = PolicyResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Send the request through this policy and the subsequent policies in the pipeline. Read more
Auto Trait Implementations§
impl Freeze for ClientRequestIdPolicy
impl RefUnwindSafe for ClientRequestIdPolicy
impl Send for ClientRequestIdPolicy
impl Sync for ClientRequestIdPolicy
impl Unpin for ClientRequestIdPolicy
impl UnwindSafe for ClientRequestIdPolicy
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