Struct azure_core::ClientOptions
source · [−]pub struct ClientOptions { /* private fields */ }
Expand description
Client options allow customization of policies, retry options, and more.
Examples
You can override default options and even add your own per-call or per-retry policies:
use azure_core::{ClientOptions, RetryOptions, TelemetryOptions};
let options: ClientOptions = ClientOptions::default()
.retry(RetryOptions::default().max_retries(10u32))
.telemetry(TelemetryOptions::default().application_id("my-application"));
Implementations
sourceimpl ClientOptions
impl ClientOptions
pub fn new(transport: TransportOptions) -> Self
sourcepub fn per_call_policies_mut(&mut self) -> &mut Vec<Arc<dyn Policy>>
pub fn per_call_policies_mut(&mut self) -> &mut Vec<Arc<dyn Policy>>
A mutable reference to per-call policies.
sourcepub fn per_retry_policies_mut(&mut self) -> &mut Vec<Arc<dyn Policy>>
pub fn per_retry_policies_mut(&mut self) -> &mut Vec<Arc<dyn Policy>>
A mutable reference to per-retry policies.
pub fn per_call_policies<T: Into<Vec<Arc<dyn Policy>>>>(
self,
per_call_policies: T
) -> Self
pub fn per_retry_policies<T: Into<Vec<Arc<dyn Policy>>>>(
self,
per_retry_policies: T
) -> Self
pub fn retry<T: Into<RetryOptions>>(self, retry: T) -> Self
pub fn telemetry<T: Into<TelemetryOptions>>(self, telemetry: T) -> Self
pub fn transport<T: Into<TransportOptions>>(self, transport: T) -> Self
Trait Implementations
sourceimpl Clone for ClientOptions
impl Clone for ClientOptions
sourcefn clone(&self) -> ClientOptions
fn clone(&self) -> ClientOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ClientOptions
impl Debug for ClientOptions
sourceimpl Default for ClientOptions
impl Default for ClientOptions
sourcefn default() -> ClientOptions
fn default() -> ClientOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for ClientOptions
impl Send for ClientOptions
impl Sync for ClientOptions
impl Unpin for ClientOptions
impl !UnwindSafe for ClientOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more