Struct ExponentialBackoffMaker

struct ExponentialBackoffMaker<R = crate::util::rng::HasherRng> { ... }

A maker type for ExponentialBackoff.

Implementations

impl<R> ExponentialBackoffMaker<R>

fn new(min: time::Duration, max: time::Duration, jitter: f64, rng: R) -> Result<Self, InvalidBackoff>

Create a new ExponentialBackoff.

Error

Returns a config validation error if:

  • min > max
  • max > 0
  • jitter >= 0.0
  • jitter < 100.0
  • jitter is finite

impl Default for ExponentialBackoffMaker

fn default() -> Self

impl<R> Freeze for ExponentialBackoffMaker<R>

impl<R> MakeBackoff for ExponentialBackoffMaker<R>

fn make_backoff(self: &mut Self) -> <Self as >::Backoff

impl<R> RefUnwindSafe for ExponentialBackoffMaker<R>

impl<R> Send for ExponentialBackoffMaker<R>

impl<R> Sync for ExponentialBackoffMaker<R>

impl<R> Unpin for ExponentialBackoffMaker<R>

impl<R> UnwindSafe for ExponentialBackoffMaker<R>

impl<R: $crate::clone::Clone> Clone for ExponentialBackoffMaker<R>

fn clone(self: &Self) -> ExponentialBackoffMaker<R>

impl<R: $crate::fmt::Debug> Debug for ExponentialBackoffMaker<R>

fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result

impl<T> Any for ExponentialBackoffMaker<R>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for ExponentialBackoffMaker<R>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for ExponentialBackoffMaker<R>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for ExponentialBackoffMaker<R>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for ExponentialBackoffMaker<R>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for ExponentialBackoffMaker<R>

impl<T> ToOwned for ExponentialBackoffMaker<R>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T> WithSubscriber for ExponentialBackoffMaker<R>

impl<T, U> Into for ExponentialBackoffMaker<R>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for ExponentialBackoffMaker<R>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for ExponentialBackoffMaker<R>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>