pub trait MaxInterval: Iterator<Item = Duration> {
// Provided methods
fn max_interval(self, max_interval: u64) -> MaxIntervalIterator<Self> ⓘ
where Self: Sized { ... }
fn max_duration(self, max_duration: Duration) -> MaxIntervalIterator<Self> ⓘ
where Self: Sized { ... }
}
Expand description
Wraps a strategy, applying `max_interval``, after which strategy will stop retrying.
Provided Methods§
sourcefn max_interval(self, max_interval: u64) -> MaxIntervalIterator<Self> ⓘwhere
Self: Sized,
fn max_interval(self, max_interval: u64) -> MaxIntervalIterator<Self> ⓘwhere
Self: Sized,
Applies a max_interval
for a strategy. Same as max_duration
, but using millis instead of Duration
.
sourcefn max_duration(self, max_duration: Duration) -> MaxIntervalIterator<Self> ⓘwhere
Self: Sized,
fn max_duration(self, max_duration: Duration) -> MaxIntervalIterator<Self> ⓘwhere
Self: Sized,
Applies a max_duration
for a strategy. In max_duration
from now,
the strategy will stop retrying. If max_duration
is passed, the strategy
will stop retrying after max_duration
is reached.