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_first

crates.io ci codecov license

Emit only the first value, then complete.

See Also

Example

cargo run -p rx_core --example operator_first_example
let _subscription = (1..=5)
    .into_observable()
    .first()
    .subscribe(PrintObserver::new("first_operator"));

Output:

first_operator - next: 1
first_operator - completed
first_operator - unsubscribed