Struct ExponentialBackoffMaker
pub struct ExponentialBackoffMaker<R = HasherRng> { /* private fields */ }
A maker type for ExponentialBackoff.
Implementations
impl<R> ExponentialBackoffMaker<R>
where
R: Rng,
fn new(min: Duration, max: Duration, jitter: f64, rng: R) -> Result<Self, InvalidBackoff>Create a new
ExponentialBackoff.Error
Returns a config validation error if:
min>maxmax== 0jitter<0.0jitter>100.0jitteris NaN
Trait Implementations
impl Default for ExponentialBackoffMaker
fn default() -> Self
impl<R> MakeBackoff for ExponentialBackoffMaker<R>
where
R: Rng + Clone,
type Backoff = ExponentialBackoff<R>;fn make_backoff(&mut self) -> Self::Backoff
impl<R: Clone> Clone for ExponentialBackoffMaker<R>
fn clone(&self) -> ExponentialBackoffMaker<R>
impl<R: Debug> Debug for ExponentialBackoffMaker<R>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl<R> Freeze for ExponentialBackoffMaker<R>
where
R: Freeze,
impl<R> RefUnwindSafe for ExponentialBackoffMaker<R>
where
R: RefUnwindSafe,
impl<R> Send for ExponentialBackoffMaker<R>
where
R: Send,
impl<R> Sync for ExponentialBackoffMaker<R>
where
R: Sync,
impl<R> Unpin for ExponentialBackoffMaker<R>
where
R: Unpin,
impl<R> UnsafeUnpin for ExponentialBackoffMaker<R>
where
R: UnsafeUnpin,
impl<R> UnwindSafe for ExponentialBackoffMaker<R>
where
R: UnwindSafe,
Blanket Implementations
impl<T> Any for ExponentialBackoffMaker<R>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for ExponentialBackoffMaker<R>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for ExponentialBackoffMaker<R>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for ExponentialBackoffMaker<R>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for ExponentialBackoffMaker<R>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for ExponentialBackoffMaker<R>
impl<T> ToOwned for ExponentialBackoffMaker<R>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> WithSubscriber for ExponentialBackoffMaker<R>
impl<T, U> Into<U> for ExponentialBackoffMaker<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 ExponentialBackoffMaker<R>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for ExponentialBackoffMaker<R>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>