retry_async

Function retry_async 

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

Retry an async operation with exponential backoff.

§Arguments

  • config - Retry configuration
  • operation - Async function to retry

§Returns

The result of the operation, or the last error if all retries failed