Skip to main content

BackoffStrategy

Trait BackoffStrategy 

Source
pub trait BackoffStrategy:
    Send
    + Sync
    + 'static {
    // Required method
    fn next_delay(&self, context: &BackoffContext) -> Duration;
}
Expand description

Computes the delay before the next retry attempt (BackoffStrategy).

Required Methods§

Source

fn next_delay(&self, context: &BackoffContext) -> Duration

The delay before the next attempt.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§