pub struct ClientRequestId(/* private fields */);Expand description
The x-ms-client-request-id header.
§Examples
Add a caller-defined client request ID to a request.
use azure_core::{
http::{ClientMethodOptions, request::options::ClientRequestId},
Uuid,
};
let client_request_id: String = Uuid::new_v4().into();
let mut options = ClientMethodOptions::default();
options.context.insert(ClientRequestId::new(client_request_id));Implementations§
Source§impl ClientRequestId
impl ClientRequestId
Sourcepub fn new<S>(s: S) -> Self
pub fn new<S>(s: S) -> Self
Creates a new instance of the request option type, which can be used as an HTTP header or query parameter.
This function is typically used to construct a value representing a request option for use in HTTP requests. The specific usage (header or query parameter) depends on how the macro is invoked.
Sourcepub const fn from_static(s: &'static str) -> Self
pub const fn from_static(s: &'static str) -> Self
Creates a new instance of the request option from a static string slice.
Trait Implementations§
Source§impl Clone for ClientRequestId
impl Clone for ClientRequestId
Source§fn clone(&self) -> ClientRequestId
fn clone(&self) -> ClientRequestId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ClientRequestId
impl Debug for ClientRequestId
Source§impl<S> From<S> for ClientRequestId
impl<S> From<S> for ClientRequestId
Source§impl Header for ClientRequestId
impl Header for ClientRequestId
Source§fn name(&self) -> HeaderName
fn name(&self) -> HeaderName
Get the name of the header.
Source§fn value(&self) -> HeaderValue
fn value(&self) -> HeaderValue
Get the value of the header.
Auto Trait Implementations§
impl Freeze for ClientRequestId
impl RefUnwindSafe for ClientRequestId
impl Send for ClientRequestId
impl Sync for ClientRequestId
impl Unpin for ClientRequestId
impl UnsafeUnpin for ClientRequestId
impl UnwindSafe for ClientRequestId
Blanket Implementations§
Source§impl<T> AsHeaders for Twhere
T: Header,
impl<T> AsHeaders for Twhere
T: Header,
Source§fn as_headers(&self) -> Result<<T as AsHeaders>::Iter, <T as AsHeaders>::Error>
fn as_headers(&self) -> Result<<T as AsHeaders>::Iter, <T as AsHeaders>::Error>
Iterate over all the header name/value pairs.
Source§type Iter = IntoIter<(HeaderName, HeaderValue)>
type Iter = IntoIter<(HeaderName, HeaderValue)>
The iterator type which yields header name/value pairs.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
Source§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
Decompress response bodies. Read more
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more