rx_core_operator_catch

Crates.iorx_core_operator_catch
lib.rsrx_core_operator_catch
version0.2.0
created_at2026-01-19 13:05:42.190927+00
updated_at2026-01-24 15:04:55.81269+00
descriptioncatch operator for rx_core
homepagehttps://github.com/AlexAegis/rx_bevy
repositoryhttps://github.com/AlexAegis/rx_bevy
max_upload_size
id2054589
size19,388
Sandor (AlexAegis)

documentation

https://github.com/AlexAegis/rx_bevy

README

operator_catch

crates.io ci codecov license

On error, switch to a recovery observable.

See Also

Example

cargo run -p rx_core --example operator_catch_example
let _s = concat((
    (1..=3).into_observable().map_never(),
    throw("error").map_never(),
))
.map(|i| i * 10)
.catch(|_error| IteratorObservable::new(90..=92))
.subscribe(PrintObserver::new("catch"));

Output:

catch - next: 10
catch - next: 20
catch - next: 30
catch - next: 90
catch - next: 91
catch - next: 92
catch - completed
catch - unsubscribed
Commit count: 652

cargo fmt