Trait PollingBackoffPolicy

Source
pub trait PollingBackoffPolicy:
    Send
    + Sync
    + Debug {
    // Required method
    fn wait_period(&self, loop_start: Instant, attempt_count: u32) -> Duration;
}
Expand description

Defines the trait implemented by all backoff strategies.

Required Methods§

Source

fn wait_period(&self, loop_start: Instant, attempt_count: u32) -> Duration

Returns the backoff delay on a failure.

§Parameters
  • loop_start - when the polling loop started.
  • attempt_count - the number of poll queries. This method is always called after the first attempt.

Implementors§