Struct ExponentialBackoff
pub struct ExponentialBackoff<R = HasherRng> { /* private fields */ }
A jittered exponential backoff strategy.
The backoff duration will increase exponentially for every subsequent backoff, up to a maximum duration. A small amount of random jitter is added to each backoff duration, in order to avoid retry spikes.
Trait Implementations
impl<R> Backoff for ExponentialBackoff<R>
where
R: Rng,
type Future = Sleep;fn next_backoff(&mut self) -> Self::Future
impl<R: Clone> Clone for ExponentialBackoff<R>
fn clone(&self) -> ExponentialBackoff<R>
impl<R: Debug> Debug for ExponentialBackoff<R>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl<R> Freeze for ExponentialBackoff<R>
where
R: Freeze,
impl<R> RefUnwindSafe for ExponentialBackoff<R>
where
R: RefUnwindSafe,
impl<R> Send for ExponentialBackoff<R>
where
R: Send,
impl<R> Sync for ExponentialBackoff<R>
where
R: Sync,
impl<R> Unpin for ExponentialBackoff<R>
where
R: Unpin,
impl<R> UnsafeUnpin for ExponentialBackoff<R>
where
R: UnsafeUnpin,
impl<R> UnwindSafe for ExponentialBackoff<R>
where
R: UnwindSafe,
Blanket Implementations
impl<T> Any for ExponentialBackoff<R>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for ExponentialBackoff<R>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for ExponentialBackoff<R>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for ExponentialBackoff<R>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for ExponentialBackoff<R>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for ExponentialBackoff<R>
impl<T> ToOwned for ExponentialBackoff<R>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> WithSubscriber for ExponentialBackoff<R>
impl<T, U> Into<U> for ExponentialBackoff<R>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for ExponentialBackoff<R>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for ExponentialBackoff<R>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>