| Crates.io | rx_core_operator_tap_next |
| lib.rs | rx_core_operator_tap_next |
| version | 0.2.0 |
| created_at | 2026-01-19 19:43:46.516952+00 |
| updated_at | 2026-01-24 15:10:39.02122+00 |
| description | tap next operator for rx_core, for the simple use cases where you don't want to define an entire observable to peek into one. |
| homepage | https://github.com/AlexAegis/rx_bevy |
| repository | https://github.com/AlexAegis/rx_bevy |
| max_upload_size | |
| id | 2055164 |
| size | 14,249 |
Run a callback for each next value while letting signals pass through.
cargo run -p rx_core --example operator_tap_next_example
let _subscription = (1..=5)
.into_observable()
.tap_next(|next| println!("hello {next}"))
.subscribe(PrintObserver::new("tap_operator"));
Output:
hello 1
tap_operator - next: 1
hello 2
tap_operator - next: 2
hello 3
tap_operator - next: 3
hello 4
tap_operator - next: 4
hello 5
tap_operator - next: 5
tap_operator - completed
tap_operator - unsubscribed