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_map_never

crates.io ci codecov license

Re-type Never next/error channels into concrete types.

See Also

Example

cargo run -p rx_core --example operator_map_never_example
let _subscription_error = throw("error")
    .map_never()
    .subscribe(PrintObserver::<i32, &'static str>::new("map_never (next)"));

let _subscription_next = just(1)
    .map_never()
    .subscribe(PrintObserver::<i32, &'static str>::new("map_never (error)"));

let _subscription_both = empty()
    .map_never_both()
    .subscribe(PrintObserver::<i32, &'static str>::new("map_never_both"));

Output:

map_never (next) - error: "error"
map_never (next) - unsubscribed
map_never (error) - next: 1
map_never (error) - completed
map_never (error) - unsubscribed
map_never_both - completed
map_never_both - unsubscribed