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_lift_option

crates.io ci codecov license

Filter out None and forward Some values.

See Also

Example

cargo run -p rx_core --example operator_lift_option_example
let _subscription = (1..=5)
    .into_observable()
    .map(|i| if i % 2 == 0 { Some(i) } else { None })
    .lift_option()
    .subscribe(PrintObserver::new("lift_option_operator"));

Output:

lift_option_operator - next: 2
lift_option_operator - next: 4
lift_option_operator - completed
lift_option_operator - unsubscribed