pub struct LinearBackoff {
pub initial_delay: Duration,
pub increment: Duration,
pub max_delay: Duration,
pub max_retries: u32,
}Expand description
Linear backoff.
Fields§
§initial_delay: DurationInitial delay.
increment: DurationIncrement per retry.
max_delay: DurationMaximum delay.
max_retries: u32Maximum retries.
Implementations§
Source§impl LinearBackoff
impl LinearBackoff
Trait Implementations§
Source§impl Clone for LinearBackoff
impl Clone for LinearBackoff
Source§fn clone(&self) -> LinearBackoff
fn clone(&self) -> LinearBackoff
Returns a duplicate 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 LinearBackoff
impl Debug for LinearBackoff
Source§impl RetryStrategy for LinearBackoff
impl RetryStrategy for LinearBackoff
Source§fn should_retry(&self, error: &RetryableError, attempt: u32) -> Option<Duration>
fn should_retry(&self, error: &RetryableError, attempt: u32) -> Option<Duration>
Determine if and how long to wait before retrying. Read more
Source§fn max_retries(&self) -> u32
fn max_retries(&self) -> u32
Get the maximum number of retries.
Source§fn is_exhausted(&self, attempt: u32) -> bool
fn is_exhausted(&self, attempt: u32) -> bool
Check if retries are exhausted.
Auto Trait Implementations§
impl Freeze for LinearBackoff
impl RefUnwindSafe for LinearBackoff
impl Send for LinearBackoff
impl Sync for LinearBackoff
impl Unpin for LinearBackoff
impl UnwindSafe for LinearBackoff
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