Function get_backoff_iter
Source pub fn get_backoff_iter() -> Backoff ⓘ
Expand description
Get a iterator of Durations which can be passed into e.g.
tokio::time::sleep to observe time-based exponential backoff.
ⓘlet mut backoff_durations = backoff::get_backoff_iter();
for _ in 0..10 {
tokio::time::sleep(backoff_durations.next().unwrap()).await;
}