pub struct Backoff {
pub base: Duration,
pub max: Duration,
pub multiplier: u32,
pub jitter: f64,
}Expand description
Exponential backoff with a cap and jitter.
Fields§
§base: DurationDelay after the first failure.
max: DurationUpper bound, however many failures accumulate.
multiplier: u32Growth per failure.
jitter: f64Fraction of the delay that is randomised, 0.0 to 1.0.
Implementations§
Trait Implementations§
impl Copy for Backoff
impl StructuralPartialEq for Backoff
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