| Crates.io | rx_core_operator_on_subscribe |
| lib.rs | rx_core_operator_on_subscribe |
| version | 0.2.0 |
| created_at | 2026-01-19 17:44:14.772913+00 |
| updated_at | 2026-01-24 15:08:58.851831+00 |
| description | on_subscribe operator for rx_core |
| homepage | https://github.com/AlexAegis/rx_bevy |
| repository | https://github.com/AlexAegis/rx_bevy |
| max_upload_size | |
| id | 2055023 |
| size | 12,908 |
Run a callback when a subscription is established.
next value while letting signals pass through.cargo run -p rx_core --example operator_on_subscribe_example
let _subscription = (1..=5)
.into_observable()
.on_subscribe(|destination| destination.next(99))
.subscribe(PrintObserver::new("on_subscribe_operator"));
Output:
on_subscribe_operator - next: 99
on_subscribe_operator - next: 1
on_subscribe_operator - next: 2
on_subscribe_operator - next: 3
on_subscribe_operator - next: 4
on_subscribe_operator - next: 5
on_subscribe_operator - completed
on_subscribe_operator - unsubscribed