NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io
crates.io, #2370 most downloaded on crates.io
Utilities for retrying operations that can fail.
Latest stable
2.2.0
Last release 9 months ago
31 Jan 2026
Release timing varies
gaps range from 2 weeks to 3.1 years
Nearly every release is documented
notes for 14 of 15 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
15 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
Various constructors are now annotated with #[must_use].
Improvements:
#[must_use].const contexts.Bug fixes:
jitter function modifies the input Duration atomically rather than to seconds and nanoseconds separately, resulting in less predictable jitter.New constructors, retry::Range::{try_from_millis_exclusive, try_from_millis_inclusive}, offering non-panicking variants of the existing constructors.
New features:
retry::delay::Range::{try_from_millis_exclusive, try_from_millis_inclusive}, offering non-panicking variants of the existing constructors.Dependencies:
rand 0.8 to 0.9.retry::Error is now a struct with public fields instead of an enum with a useless Internal variant. (See #38 and #42.)
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Breaking changes:
retry::Error is now a struct with public fields instead of an enum with a useless Internal variant. (See #38 and #42.)retry::delay::Exponential::from_millis now uses an exponential backoff factor of 2.0 instead of whatever the initial delay is. If you want the old behavior, use retry::delay::Exponential::from_millis_with_base_factor instead. (See #31.)Improvements:
Fixes:
Bump the version of rand due to RUSTSEC-2021-0023.
Improvements:
retry::OperationResult now has predicate methods to check for a specific variant:
New features:
retry::OperationResult now has predicate methods to check for a specific variant:
is_okis_retryis_errRemoved async code that is not used.
Improvements:
Bug fixes:
retry::Error now correctly displays the error it wraps when printed. (#35)The features of the crate involving randomness are now behind the "random" Cargo feature. This feature is enabled for backwards compatibility, but can
Improvements:
retry::Exponential::from_millis_with_factor is added to support a configurable multiplication factor for exponential delays.
New features:
retry::delay::Exponential::from_millis_with_factor is added to support a configurable multiplication factor for exponential delays.retry's API is now stable for the 1.0 series.
retry's API is now stable for the 1.0 series.
New features:
retry_with_index function that works like retry, but passes the number of the current try (as u64) as an argument to the supplied closure.Improvements:
retry::delay::{Exponential, Fibonacci} now implement From<std::time::Duration>.retry::delay::Range now implements From<std::ops::Range<std::time::Duration>> and From<std::ops::RangeInclusive<std::time::Duration>>.The Fixed delay now implements From .
Improvements:
Fixed delay now implements From<Duration>.The library has been significantly redesigned and now offers a simpler and more flexible interface. See the documentation for details.
Breaking changes:
New features:
OperationResult type allows for returning an error immediately, halting all retry behavior.Uses of the deprecated std::sleep_ms have been replaced with std::sleep.
Breaking changes:
u32 values as arguments now take u64 values instead.New features:
retry_exponentially, is similar to the retry function but uses an f64 wait value as the multiplier for exponential backoff.Retry builder type:
timeout for setting the maximum amount of time before failure.wait_between for adding some random jitter to the amount of delay between each try.wait_exponentially for waiting exponentially longer with each try.Improvements:
std::thread::sleep_ms have been replaced with std::thread::sleep.Added: Retry type for incrementally building a retryable operation. Currently, this allows for retrying an operation infinitely. Soon it will allow fo
Retry type for incrementally building a retryable operation. Currently, this allows for retrying an operation infinitely. Soon it will allow for more customizations of behavior.Changed: The retry function's times argument is now a u32 instead of a usize.
retry function's times argument is now a u32 instead of a usize.Nothing published for this version
One column per quarter.