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

crates.io ci codecov license

Transform each value with a mapping function.

See Also

Example

cargo run -p rx_core --example operator_map_example
let _subscription = (1..=5)
    .into_observable()
    .map(|i| i * 2)
    .subscribe(PrintObserver::new("map_operator"));

Output:

map_operator - next: 2
map_operator - next: 4
map_operator - next: 6
map_operator - next: 8
map_operator - next: 10
map_operator - completed
map_operator - unsubscribed