Trait backoff::backoff::Backoff
[−]
[src]
pub trait Backoff { fn next_backoff(&mut self) -> Option<Duration>; fn reset(&mut self) { ... } }
Backoff
is a backoff policy for retrying an operation.
Required Methods
fn next_backoff(&mut self) -> Option<Duration>
next_backoff() time is elapsed before it is called again. If it returns None, it means the operation timed out and no further retries are done.
Provided Methods
fn reset(&mut self)
Resets the internal state to the initial value.
Implementors
impl Backoff for Zero
impl Backoff for Stop
impl Backoff for Constant
impl<C> Backoff for ExponentialBackoff<C> where
C: Clock,