retry_with_backoff

Function retry_with_backoff 

Source
pub async fn retry_with_backoff<F, Fut, T, E>(
    operation: F,
    config: RetryConfig,
    should_retry: impl Fn(&E) -> bool,
) -> Result<T, E>
where F: FnMut() -> Fut, Fut: Future<Output = Result<T, E>>,
Expand description

Retry a future with exponential backoff

ยงPanics

Panics if no retry attempts are made and no error is captured