Module pravega_client_retry::retry_sync[][src]

Functions

retry_internal
retry_sync

Retry the given operation synchronously until it succeeds, or until the given Duration end. retry_schedule: The retry policy that has max retry times and retry delay. It can be used as follows: let retry_policy = RetryWithBackoff::default(); let mut collection = vec![1, 2].into_iter(); let res = retry_sync(retry_policy, || match collection.next() { Some(n) if n == 3 => RetryResult::Success(n), Some(_) => RetryResult::Retry(SnafuError::Retryable), None => RetryResult::Fail(SnafuError::Nonretryable), });