pub struct Backoff { /* private fields */ }Expand description
Exponential backoff with a configurable cap.
Each call to next_delay doubles the delay
(starting from initial_delay_secs) up to max_delay_secs. Calling
reset returns to the initial delay.
This is fully deterministic — no timers or randomness.
Implementations§
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 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