Struct azure_core::RetryOptions
source · [−]pub struct RetryOptions {
pub mode: RetryMode,
pub delay: Duration,
pub max_retries: u32,
pub max_elapsed: Duration,
pub max_delay: Duration,
}
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.
Fields
mode: RetryMode
The algorithm to use for calculating retry delays.
The default is RetryMode::Exponential
delay: Duration
The delay between retry attempts for a fixed algorithm or the delay on which to base calculations for a back-off-based approach.
The default is 200 milliseconds.
max_retries: u32
The maximum number of retry attempts before giving up.
The default is 8.
max_elapsed: Duration
The maximum permissible elapsed time since starting to retry.
The default is 1 minute.
max_delay: Duration
The maximum permissible time between retries.
The default is 30 seconds. For SRE reasons, this is only respected when above 1 second. This option is ignored when using retry modes that do not change their delay time.
Implementations
sourceimpl RetryOptions
impl RetryOptions
pub fn mode<P: Into<RetryMode>>(self, mode: P) -> Self
pub fn delay<P: Into<Duration>>(self, delay: P) -> Self
pub fn max_retries<P: Into<u32>>(self, max_retries: P) -> Self
pub fn max_elapsed<P: Into<Duration>>(self, max_elapsed: P) -> Self
pub fn max_delay<P: Into<Duration>>(self, max_delay: P) -> Self
Trait Implementations
sourceimpl Clone for RetryOptions
impl Clone for RetryOptions
sourcefn clone(&self) -> RetryOptions
fn clone(&self) -> RetryOptions
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 RetryOptions
impl Debug for RetryOptions
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
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