# retry_with_back_off

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-dynamic-data/kernel/function-retry_with_back_off/

**function** · [`ferroui-dynamic-data`](/docs/0.5.0/api/ferroui-dynamic-data/) · v0.5.0

```rust
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>`).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DynamicData/kernel/internal_ex.rs#L32)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
