Trait backon::Backoff

source ·
pub trait Backoff: Iterator<Item = Duration> + Send + Sync + Unpin { }
Expand description

Backoff is an Iterator that returns Duration.

  • Some(Duration) means caller need to sleep(Duration) and retry the same request
  • None means we have reaching the limits, caller needs to return current error instead.

Implementors§

source§

impl<T> Backoff for T
where T: Iterator<Item = Duration> + Debug + Send + Sync + Unpin,