Trait tiny_tokio_actor::RetryStrategy
source · 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§
sourcefn max_retries(&self) -> usize
fn max_retries(&self) -> usize
Maximum number of tries before permanently failing an actor
sourcefn next_backoff(&mut self) -> Option<Duration>
fn next_backoff(&mut self) -> Option<Duration>
Wait duration before retrying