Skip to main content

retry

Function retry 

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

Run op, retrying per policy while failures stay retryable.

ยงErrors

Returns the last error once attempts are exhausted or the failure is not retryable for this OpKind.