Struct retry_future::LinearRetryStrategy
source · [−]pub struct LinearRetryStrategy {
pub max_attempts: usize,
pub delay_between_retries: Duration,
pub retry_early_returned_errors: bool,
}Expand description
Simple retry strategy that is retrying futures after Duration
Fields
max_attempts: usizedelay_between_retries: Durationretry_early_returned_errors: boolImplementations
sourceimpl LinearRetryStrategy
impl LinearRetryStrategy
pub fn new() -> Self
pub fn max_attempts(self, max_attempts: usize) -> Self
pub fn delay_between_retries(self, delay_between_retries: Duration) -> Self
sourcepub fn retry_early_returned_errors(
self,
retry_early_returned_errors: bool
) -> Self
pub fn retry_early_returned_errors(
self,
retry_early_returned_errors: bool
) -> Self
Trait Implementations
sourceimpl Default for LinearRetryStrategy
impl Default for LinearRetryStrategy
sourceimpl RetryStrategy for LinearRetryStrategy
impl RetryStrategy for LinearRetryStrategy
sourcefn check_attempt(
&mut self,
attempts_before: usize
) -> Result<Duration, TooManyAttempts>
fn check_attempt(
&mut self,
attempts_before: usize
) -> Result<Duration, TooManyAttempts>
sourcefn retry_early_returned_errors(&self) -> bool
fn retry_early_returned_errors(&self) -> bool
Auto Trait Implementations
impl RefUnwindSafe for LinearRetryStrategy
impl Send for LinearRetryStrategy
impl Sync for LinearRetryStrategy
impl Unpin for LinearRetryStrategy
impl UnwindSafe for LinearRetryStrategy
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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