[][src]Trait backoff::backoff::Backoff

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.

Loading content...

Provided methods

fn reset(&mut self)

Resets the internal state to the initial value.

Loading content...

Implementors

impl Backoff for Constant[src]

fn reset(&mut self)[src]

impl Backoff for Stop[src]

fn reset(&mut self)[src]

impl Backoff for Zero[src]

fn reset(&mut self)[src]

impl<C> Backoff for ExponentialBackoff<C> where
    C: Clock
[src]

Loading content...