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: usize§delay_between_retries: Duration§retry_early_returned_errors: boolImplementations§
Source§impl 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§
Source§impl Default for LinearRetryStrategy
impl Default for LinearRetryStrategy
Source§impl RetryStrategy for LinearRetryStrategy
impl RetryStrategy for LinearRetryStrategy
Source§fn check_attempt(
&mut self,
attempts_before: usize,
) -> Result<Duration, TooManyAttempts>
fn check_attempt( &mut self, attempts_before: usize, ) -> Result<Duration, TooManyAttempts>
attempts_before means how many attempts a future
was trying to resolve to Ok(_) after returning Err(_).Source§fn retry_early_returned_errors(&self) -> bool
fn retry_early_returned_errors(&self) -> bool
Auto Trait Implementations§
impl Freeze for LinearRetryStrategy
impl RefUnwindSafe for LinearRetryStrategy
impl Send for LinearRetryStrategy
impl Sync for LinearRetryStrategy
impl Unpin for LinearRetryStrategy
impl UnwindSafe for LinearRetryStrategy
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