| Crates.io | rx_core_observable_create |
| lib.rs | rx_core_observable_create |
| version | 0.2.0 |
| created_at | 2026-01-19 09:28:59.8887+00 |
| updated_at | 2026-01-24 15:02:22.0084+00 |
| description | create observable for rx_core |
| homepage | https://github.com/AlexAegis/rx_bevy |
| repository | https://github.com/AlexAegis/rx_bevy |
| max_upload_size | |
| id | 2054125 |
| size | 11,255 |
The create_observable provides a simple way to create custom observables by
defining a producer function that can emit values to subscribers.
The producer function is cloned for each subscribe call to avoid shared state between individual subscriptions.
cargo run -p rx_core --example observable_create_example
let _s = create_observable::<&str, Never, _>(|destination| {
destination.next("hello");
destination.complete();
})
.subscribe(PrintObserver::new("create_observable"));
create_observable - next: "hello"
create_observable - completed
create_observable - unsubscribed