retry
Utilities for retrying operations that can fail.
2.2.0
18M downloads/mo
#2237 most downloaded on crates.io
jimmycuadra/retry
What this package is like to depend on
Last release 6 months ago
31 Jan 2026
Release timing varies
gaps range from 2 weeks to 3.1 years
Most releases are documented
notes for 10 of 15 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
15 releases · first in 2015
1 release in the last 12 months
see the full history below
Release timeline
15 releases · Apr 2015 to Jan 2026Releases
latest 15-
2.2.031 Jan 2026Release notes
Open source →Improvements:
- Various constructors are now annotated with
#[must_use]. - Make simple functions available in
constcontexts.
Bug fixes:
- The
jitterfunction modifies the inputDurationatomically rather than to seconds and nanoseconds separately, resulting in less predictable jitter.
- Various constructors are now annotated with
-
2.1.029 Mar 2025Release notes
Open source →New features:
- New constructors,
retry::delay::Range::{try_from_millis_exclusive, try_from_millis_inclusive}, offering non-panicking variants of the existing constructors.
Dependencies:
- Updated from
rand0.8 to 0.9.
- New constructors,
-
2.0.017 Sep 2022Release notes
Open source →Breaking changes:
retry::Erroris now a struct with public fields instead of an enum with a uselessInternalvariant. (See #38 and #42.)retry::delay::Exponential::from_millisnow uses an exponential backoff factor of2.0instead of whatever the initial delay is. If you want the old behavior, useretry::delay::Exponential::from_millis_with_base_factorinstead. (See #31.)
Improvements:
- The crate's documentation now uses Intra-rustdoc links for convenient navigation.
Fixes:
- Fixed a broken external link in the documentation.
-
1.3.102 Feb 2022 -
1.3.014 Aug 2021Release notes
Open source →New features:
retry::OperationResultnow has predicate methods to check for a specific variant:is_okis_retryis_err
-
1.2.124 Apr 2021Release notes
Open source →Improvements:
- Removed async code that is not used. (#36)
Bug fixes:
retry::Errornow correctly displays the error it wraps when printed. (#35)
-
1.2.009 Dec 2020Release notes
Open source →Improvements:
- The features of the crate involving randomness are now behind the "random" Cargo feature. This feature is enabled for backwards compatibility, but can now be turned off via Cargo.toml to avoid installing the rand crates if they're not needed.
-
1.1.015 Aug 2020Release notes
Open source →New features:
retry::delay::Exponential::from_millis_with_factoris added to support a configurable multiplication factor for exponential delays.
-
1.0.012 Jan 2020Release notes
Open source →retry's API is now stable for the 1.0 series.New features:
- Added a
retry_with_indexfunction that works likeretry, but passes the number of the current try (asu64) as an argument to the supplied closure.
Improvements:
retry::delay::{Exponential, Fibonacci}now implementFrom<std::time::Duration>.retry::delay::Rangenow implementsFrom<std::ops::Range<std::time::Duration>>andFrom<std::ops::RangeInclusive<std::time::Duration>>.
- Added a
-
0.5.110 Jun 2019 -
0.5.025 May 2019Nothing published for this version
-
0.4.002 Apr 2016Nothing published for this version
-
0.3.013 Apr 2015Nothing published for this version
-
0.2.012 Apr 2015Nothing published for this version
-
0.1.011 Apr 2015Nothing published for this version