Struct azure_core::RetryOptions
source · pub struct RetryOptions { /* private fields */ }
Expand description
Specify how retries should behave.
Note that not all requests can be retried. These options will only be used when a retry is attempted.
The default is an exponential retry policy using the default ExponentialRetryOptions
.
Implementations§
source§impl RetryOptions
impl RetryOptions
sourcepub fn exponential(options: ExponentialRetryOptions) -> Self
pub fn exponential(options: ExponentialRetryOptions) -> Self
A retry strategy where attempts happen at intervals that get exponentially longer with each retry.
sourcepub fn fixed(options: FixedRetryOptions) -> Self
pub fn fixed(options: FixedRetryOptions) -> Self
A retry strategy where attempts happen at fixed intervals; each delay is a consistent duration.
sourcepub fn custom<T: RetryPolicy + 'static>(policy: Arc<T>) -> Self
pub fn custom<T: RetryPolicy + 'static>(policy: Arc<T>) -> Self
A custom retry using the supplied retry policy.
Trait Implementations§
source§impl Clone for RetryOptions
impl Clone for RetryOptions
source§fn clone(&self) -> RetryOptions
fn clone(&self) -> RetryOptions
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 Debug for RetryOptions
impl Debug for RetryOptions
source§impl Default for RetryOptions
impl Default for RetryOptions
source§fn default() -> RetryOptions
fn default() -> RetryOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for RetryOptions
impl Send for RetryOptions
impl Sync for RetryOptions
impl Unpin for RetryOptions
impl !UnwindSafe for RetryOptions
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