pub async fn retry_async<F, Fut, T, E>(
policy: &RetryPolicy,
f: F,
) -> Result<T, E>Expand description
Executes f up to policy.max_attempts times, sleeping between attempts
according to the policy, and returns the first Ok result or the last
error.
ยงType Parameters
F: An async closure/function that produces aFuture.Fut: TheFuturetype returned byf.T: The success type.E: The error type; must implementstd::fmt::Displayfor retryability checks.