observable_throw
Immediately errors.
See Also
- CatchOperator - On error, switch to a recovery observable.
- RetryOperator - Resubscribe on error up to the configured retry count.
- CreateObservable - Define your own function that will interact with the subscriber!
- DeferredObservable - Subscribes to an observable returned by a function.
- JustObservable - Immediately emits a single value!
- EmptyObservable - Immediately completes!
- ClosedObservable - Immediately unsubscribes!
- NeverObservable - Never emits, never unsubscribes! Only once dropped!
Example
cargo run -p rx_core --example observable_throw_example
let _subscription = throw("hello").subscribe(PrintObserver::new("throw_example"));
Output:
throw_example - error: "hello"