pub enum BackoffStrategy {
None,
Fixed(Duration),
Linear(Duration),
Exponential {
base: Duration,
max: Duration,
},
}Expand description
Strategy for computing delay between retries.
Variants§
None
No delay between retries
Fixed(Duration)
Fixed delay between retries
Linear(Duration)
Linear backoff: delay * attempt_number
Exponential
Exponential backoff: delay * 2^attempt_number, capped at max
Implementations§
Trait Implementations§
Source§impl Clone for BackoffStrategy
impl Clone for BackoffStrategy
Source§fn clone(&self) -> BackoffStrategy
fn clone(&self) -> BackoffStrategy
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 BackoffStrategy
impl Debug for BackoffStrategy
Source§impl Default for BackoffStrategy
impl Default for BackoffStrategy
Source§fn default() -> BackoffStrategy
fn default() -> BackoffStrategy
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BackoffStrategy
impl RefUnwindSafe for BackoffStrategy
impl Send for BackoffStrategy
impl Sync for BackoffStrategy
impl Unpin for BackoffStrategy
impl UnsafeUnpin for BackoffStrategy
impl UnwindSafe for BackoffStrategy
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