pub struct FixedRetryOptions {
    pub delay: Duration,
    pub max_retries: u32,
    pub max_total_elapsed: Duration,
}Expand description
Options for how a fixed retry strategy should behave.
§Example
Configuring retry to be fixed with 10 retries max.
RetryOptions::fixed(
   FixedRetryOptions::default()
       .max_retries(10u32)
);Fields§
§delay: DurationThe delay between retry attempts.
The default is 200 milliseconds.
max_retries: u32The maximum number of retry attempts before giving up.
The default is 8.
max_total_elapsed: DurationThe maximum permissible elapsed time since starting to retry.
The default is 1 minute.
Implementations§
Source§impl FixedRetryOptions
 
impl FixedRetryOptions
Sourcepub fn max_retries<P: Into<u32>>(self, max_retries: P) -> Self
 
pub fn max_retries<P: Into<u32>>(self, max_retries: P) -> Self
Set the maximum number of retry attempts before giving up.
Sourcepub fn max_total_elapsed<P: Into<Duration>>(self, max_total_elapsed: P) -> Self
 
pub fn max_total_elapsed<P: Into<Duration>>(self, max_total_elapsed: P) -> Self
Set the maximum permissible elapsed time since starting to retry.
Trait Implementations§
Source§impl Clone for FixedRetryOptions
 
impl Clone for FixedRetryOptions
Source§fn clone(&self) -> FixedRetryOptions
 
fn clone(&self) -> FixedRetryOptions
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 FixedRetryOptions
 
impl Debug for FixedRetryOptions
Auto Trait Implementations§
impl Freeze for FixedRetryOptions
impl RefUnwindSafe for FixedRetryOptions
impl Send for FixedRetryOptions
impl Sync for FixedRetryOptions
impl Unpin for FixedRetryOptions
impl UnwindSafe for FixedRetryOptions
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
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> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more