Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

operator_retry

crates.io ci codecov license

Book Page - Operator Source - Subscriber Source

Resubscribe on error up to the configured retry count.

See Also

Example

Run the example with:

cargo run -p rx_core --example operator_retry_example
let mut retried = concat((
    (0..=2).into_observable().map_never(),
    throw("error").map_never(),
))
.retry(2);

let _s1 = retried.subscribe(PrintObserver::new("retry_operator"));

Output:

retry_operator - next: 0
retry_operator - next: 1
retry_operator - next: 2
retry_operator - next: 0
retry_operator - next: 1
retry_operator - next: 2
retry_operator - next: 0
retry_operator - next: 1
retry_operator - next: 2
retry_operator - error: "error"
retry_operator - unsubscribed