rx_core_operator_map 0.2.2

map operator for rx_core
Documentation

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