Skip to main content

with_retry

Function with_retry 

Source
pub async fn with_retry<F, Fut, T, E>(
    policy: &RetryPolicy,
    op: F,
) -> Result<T, E>
where F: FnMut() -> Fut, Fut: Future<Output = Result<T, E>>, E: Display,
Expand description

Execute an async operation with the given retry policy (all errors are considered retryable).