pub async fn retry<T, F, Fut>( policy: &RetryPolicy, kind: OpKind, op: F, ) -> Result<T>where F: FnMut() -> Fut, Fut: Future<Output = Result<T>>,
Run op, retrying per policy while failures stay retryable.
op
policy
Returns the last error once attempts are exhausted or the failure is not retryable for this OpKind.
OpKind