Skip to main content

Module retry

Module retry 

Source
Expand description

Exponential backoff with full jitter.

Retry::run re-invokes the supplied closure until either it succeeds or the attempt budget is exhausted. Backoff is min(max_delay, base * 2^attempt) with full jitter applied to the result.

Pass a custom retry predicate via RetryConfig::retry_if to skip re-execution for errors that aren’t transient (auth failures, 4xx, …).

Structs§

Retry
Exponential-backoff retry helper.
RetryConfig
Configuration for Retry.

Type Aliases§

RetryPredicate
Decides whether a given error should trigger another retry attempt.