pub enum Backoff {
Constant(Duration),
Exponential {
initial: Duration,
max: Duration,
factor: u32,
},
}Expand description
Delay strategy applied between retry attempts.
Variants§
Constant(Duration)
Use the same delay between every attempt.
Exponential
Multiply the delay after each failed attempt up to a ceiling.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Backoff
impl RefUnwindSafe for Backoff
impl Send for Backoff
impl Sync for Backoff
impl Unpin for Backoff
impl UnsafeUnpin for Backoff
impl UnwindSafe for Backoff
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