Struct backoff::exponential::ExponentialBackoff [−][src]
Fields
current_interval: Duration
The current retry interval.
initial_interval: Duration
The initial retry interval.
randomization_factor: f64
The randomization factor to use for creating a range around the retry interval.
A randomization factor of 0.5 results in a random period ranging between 50% below and 50% above the retry interval.
multiplier: f64
The value to multiply the current interval with for each retry attempt.
max_interval: Duration
The maximum value of the back off period. Once the retry interval reaches this value it stops increasing.
start_time: Instant
The system time. It is calculated when an ExponentialBackoff
instance is
created and is reset when retry
is called.
max_elapsed_time: Option<Duration>
The maximum elapsed time after instantiating ExponentialBackfff
or calling
reset
after which next_backoff
returns None
.
clock: C
The clock used to get the current time.
Implementations
impl<C: Clock> ExponentialBackoff<C>
[src]
pub fn get_elapsed_time(&self) -> Duration
[src]
Returns the elapsed time since start_time.
Trait Implementations
impl<C> Backoff for ExponentialBackoff<C> where
C: Clock,
[src]
C: Clock,
impl<C: Debug> Debug for ExponentialBackoff<C>
[src]
impl<C> Default for ExponentialBackoff<C> where
C: Clock + Default,
[src]
C: Clock + Default,
fn default() -> ExponentialBackoff<C>
[src]
Auto Trait Implementations
impl<C> RefUnwindSafe for ExponentialBackoff<C> where
C: RefUnwindSafe,
C: RefUnwindSafe,
impl<C> Send for ExponentialBackoff<C> where
C: Send,
C: Send,
impl<C> Sync for ExponentialBackoff<C> where
C: Sync,
C: Sync,
impl<C> Unpin for ExponentialBackoff<C> where
C: Unpin,
C: Unpin,
impl<C> UnwindSafe for ExponentialBackoff<C> where
C: UnwindSafe,
C: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,