Functions

  • Retry the given operation asynchronously until it succeeds, or until the given Duration iterator ends. It can be used as follows: let retry_policy = RetryWithBackoff::default_setting(); let future = retry_async(retry_policy, || async { let previous = 1; match previous { 1 => RetryResult::Fail(“not retry”), 2 => RetryResult::Success(previous), _ => RetryResult::Retry(“retry”), } });