Skip to main content

Backoff

Trait Backoff 

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

Backoff is an Iterator that returns Duration.

  • Some(Duration) indicates the caller should sleep(Duration) and retry the request.
  • None indicates the limits have been reached, and the caller should return the current error instead.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

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