Skip to content

Releases: jimmycuadra/retry

2.1.0

29 Mar 18:53
Compare
Choose a tag to compare

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 rand 0.8 to 0.9.

2.0.0

17 Sep 11:40
Compare
Choose a tag to compare

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:

  • Fixed a broken external link in the documentation.

1.3.1

02 Feb 08:06
Compare
Choose a tag to compare

Improvements:

1.3.0

14 Aug 10:43
Compare
Choose a tag to compare

New features:

  • retry::OperationResult now has predicate methods to check for a specific variant:
    • is_ok
    • is_retry
    • is_err

1.2.1

24 Apr 20:26
Compare
Choose a tag to compare

Improvements:

  • Removed async code that is not used. (#36)

Bug fixes:

  • retry::Error now correctly displays the error it wraps when printed. (#35)

1.2.0

09 Dec 08:20
Compare
Choose a tag to compare

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

15 Aug 20:02
1.1.0
Compare
Choose a tag to compare

New features:

  • retry::delay::Exponential::from_millis_with_factor is added to support a configurable multiplication factor for exponential delays.

1.0.0

12 Jan 00:34
1.0.0
Compare
Choose a tag to compare

retry's API is now stable for the 1.0 series.

New features:

  • Added a 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>>.

0.5.1

10 Jun 06:08
0.5.1
Compare
Choose a tag to compare
0.5.1 Pre-release
Pre-release

Improvements:

  • The Fixed delay now implements From<Duration>.

0.5.0

25 May 13:59
0.5.0
Compare
Choose a tag to compare
0.5.0 Pre-release
Pre-release

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.