pub struct Backoff {
pub initial_ns: u64,
pub max_ns: u64,
pub multiplier: f64,
/* private fields */
}Expand description
Backoff provides jittered backoff values (nanoseconds) for
operations that needs to do sleeps with jittered backoff
between retries.
Fields§
§initial_ns: u64The initial value of the retry period in ns, defaults to 1s.
max_ns: u64The max value of the retry period in ns, defaults to 30s.
multiplier: f64The factor by which the retry period increases. Should be > 1, defaults to 2.
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