pub struct ClientRequestId(/* private fields */);Available on crate feature
export-azure only.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) -> ClientRequestId
pub fn new<S>(s: S) -> ClientRequestId
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) -> ClientRequestId
pub const fn from_static(s: &'static str) -> ClientRequestId
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 · 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§fn from(s: S) -> ClientRequestId
fn from(s: S) -> ClientRequestId
Converts to this type from the input type.
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 Error = Infallible
type Error = Infallible
The error type which can occur when converting the type into headers.
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