pub enum BackoffStrategy {
Fixed(Duration),
Linear {
initial: Duration,
increment: Duration,
},
Exponential {
initial: Duration,
max: Duration,
multiplier: f64,
},
}
Expand description
Backoff strategy for retries
Variants§
Fixed(Duration)
Fixed delay between retries
Linear
Linear increase in delay
Exponential
Exponential backoff
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 moreAuto Trait Implementations§
impl Freeze for BackoffStrategy
impl RefUnwindSafe for BackoffStrategy
impl Send for BackoffStrategy
impl Sync for BackoffStrategy
impl Unpin 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