[−][src]Trait tryhard::backoff_strategies::BackoffStrategy
Trait for computing the amount of delay between attempts.
Associated Types
type Output
[src]
The delay type. Will normally be either Duration
or RetryPolicy
.
Required methods
pub fn delay(&mut self, attempt: u32, error: &E) -> Self::Output
[src]
Compute the amount of delay given the number of attempts so far and the most previous error.
Implementors
impl<E> BackoffStrategy<E> for ExponentialBackoff
[src]
impl<E> BackoffStrategy<E> for FixedBackoff
[src]
impl<E> BackoffStrategy<E> for LinearBackoff
[src]
impl<E> BackoffStrategy<E> for NoBackoff
[src]
impl<F, E, T> BackoffStrategy<E> for CustomBackoffStrategy<F> where
F: FnMut(u32, &E) -> T,
RetryPolicy: From<T>,
[src]
F: FnMut(u32, &E) -> T,
RetryPolicy: From<T>,