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) -> Self

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,

impl<T> Borrow<T> for ExponentialBackoff<R> where T: ?Sized,

impl<T> BorrowMut<T> for ExponentialBackoff<R> where T: ?Sized,

impl<T> CloneToUninit for ExponentialBackoff<R> where T: Clone,

impl<T> From<T> for ExponentialBackoff<R>

impl<T> Instrument for ExponentialBackoff<R>

impl<T> ToOwned for ExponentialBackoff<R> where T: Clone,

impl<T> WithSubscriber for ExponentialBackoff<R>

impl<T, U> Into<U> for ExponentialBackoff<R> where U: From<T>,

impl<T, U> TryFrom<U> for ExponentialBackoff<R> where U: Into<T>,

impl<T, U> TryInto<U> for ExponentialBackoff<R> where U: TryFrom<T>,