You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, thank you for the great library! There are a number of async-supporting retry-libraries in Rust but I really like the user-friendly API of Backon. 🫶
As for my small feature request (and if you want I can contribute a PR for this):
Currently, FibonacciBuilder and ExponentialBuilder support overriding the max delay and max repetitions by using the .with_max_delay and .with_max_times methods.
However, since they by default already have these values set, and since there is on method to turn them off, it is not possible to use them with an indefinite amount of times, or an ever-growing amount of delay.
It is of course currently possible to build our own, by creating our own iterator, but then we're re-implementing FibonacciBackoff/ExponentialBackoff and that is a bit of a waste.
Looking at their sources, it seems like the idea to make these values optional was already considered, since they are Optional<...>.
So I'd like to propose adding .without_max_delay() and .without_max_times() (names are bikesheddable) methods to the two builders.
WDYT?
The text was updated successfully, but these errors were encountered:
First, thank you for the great library! There are a number of async-supporting retry-libraries in Rust but I really like the user-friendly API of Backon. 🫶
As for my small feature request (and if you want I can contribute a PR for this):
Currently,
FibonacciBuilder
andExponentialBuilder
support overriding the max delay and max repetitions by using the.with_max_delay
and.with_max_times
methods.However, since they by default already have these values set, and since there is on method to turn them off, it is not possible to use them with an indefinite amount of times, or an ever-growing amount of delay.
It is of course currently possible to build our own, by creating our own iterator, but then we're re-implementing
FibonacciBackoff
/ExponentialBackoff
and that is a bit of a waste.Looking at their sources, it seems like the idea to make these values optional was already considered, since they are
Optional<...>
.So I'd like to propose adding
.without_max_delay()
and.without_max_times()
(names are bikesheddable) methods to the two builders.WDYT?
The text was updated successfully, but these errors were encountered: