go_zoom_kinesis::retry::backoff

Trait Backoff

Source
pub trait Backoff: Send + Sync {
    // Required methods
    fn next_delay(&self, attempt: u32) -> Duration;
    fn reset(&mut self);
}
Expand description

Trait defining backoff behavior

Required Methods§

Source

fn next_delay(&self, attempt: u32) -> Duration

Calculate the next backoff delay

Source

fn reset(&mut self)

Reset any internal state

Implementors§