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§