Releases: jimmycuadra/retry
Releases · jimmycuadra/retry
2.1.0
2.0.0
Breaking changes:
retry::Error
is now a struct with public fields instead of an enum with a uselessInternal
variant. (See #38 and #42.)retry::delay::Exponential::from_millis
now uses an exponential backoff factor of2.0
instead of whatever the initial delay is. If you want the old behavior, useretry::delay::Exponential::from_millis_with_base_factor
instead. (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.1
Improvements:
- Bump the version of rand due to RUSTSEC-2021-0023. (#43)
1.3.0
New features:
retry::OperationResult
now has predicate methods to check for a specific variant:is_ok
is_retry
is_err
1.2.1
1.2.0
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.0
New features:
retry::delay::Exponential::from_millis_with_factor
is added to support a configurable multiplication factor for exponential delays.
1.0.0
retry
's API is now stable for the 1.0 series.
New features:
- Added a
retry_with_index
function 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::Range
now implementsFrom<std::ops::Range<std::time::Duration>>
andFrom<std::ops::RangeInclusive<std::time::Duration>>
.
0.5.1
Improvements:
- The
Fixed
delay now implementsFrom<Duration>
.
0.5.0
Breaking changes:
- The library has been significantly redesigned and now offers a simpler and more flexible interface. See the documentation for details.
New features:
- A new
OperationResult
type allows for returning an error immediately, halting all retry behavior. - Range-based delays can now be constructed with exclusive or inclusive ranges.
- A fibonacci delay is now provided.
- A function is now provided to introduce random jitter into a sequence of delays.