retry_with_back_off
function · ferroui-dynamic-data · v0.5.0
fn retry_with_back_off<T: 'static, E: std::error::Error + 'static>(source: std::rc::Rc<dyn IObservable<T>>, back_off_strategy: impl Fn(&E, usize) -> Option<std::time::Duration> + 'static) -> std::rc::Rc<dyn IObservable<T>>
The sequence, subscribed again after each error of type E once the delay that
back_off_strategy gives for the error and the number of failures so far has passed; a None
delay ends the sequence with the error (RetryWithBackOff<TSource, TException>).
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.