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_find

crates.io ci codecov license

Emit the first value that matches a predicate.

See Also

Example

cargo run -p rx_core --example operator_find_example
let _subscription = (1..=5)
    .into_observable()
    .find(|i| i % 2 == 0)
    .subscribe(PrintObserver::new("find_operator"));

Output:

find_operator - next: 2
find_operator - completed
find_operator - unsubscribed