pub trait RetryStrategy: Debug + Send + Sync {
    // Required methods
    fn max_retries(&self) -> usize;
    fn next_backoff(&mut self) -> Option<Duration>;
}
Expand description

Trait to define a RetryStrategy. You can use this trait to define your custom retry strategy.

Required Methods§

source

fn max_retries(&self) -> usize

Maximum number of tries before permanently failing an actor

source

fn next_backoff(&mut self) -> Option<Duration>

Wait duration before retrying

Implementors§