fedimint_core::util::backoff_util

Trait Backoff

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.

Implementors§

§

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