pub trait RetryStrategy {
    fn check_attempt(
        &mut self,
        attempts_before: usize
    ) -> Result<Duration, TooManyAttempts>; fn retry_early_returned_errors(&self) -> bool; }
Expand description

Configuration trait for RetryFuture.

Goal of the trait is to return either a duration which means how long a future needs to sleep before trying to resolve again or an error if there were already too many attempts.

Required Methods§

attempts_before means how many attempts a future was trying to resolve to Ok(_) after returning Err(_).

If true, errors propagated using ? inside a future will be retried.

Implementations on Foreign Types§

Implementors§