| Crates.io | rx_core_operator_catch |
| lib.rs | rx_core_operator_catch |
| version | 0.2.0 |
| created_at | 2026-01-19 13:05:42.190927+00 |
| updated_at | 2026-01-24 15:04:55.81269+00 |
| description | catch operator for rx_core |
| homepage | https://github.com/AlexAegis/rx_bevy |
| repository | https://github.com/AlexAegis/rx_bevy |
| max_upload_size | |
| id | 2054589 |
| size | 19,388 |
On error, switch to a recovery observable.
Result values.Result values into next and error signals.Never as the error type to guard pipelines at compile time.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