rx_core_observable_create

Crates.iorx_core_observable_create
lib.rsrx_core_observable_create
version0.2.0
created_at2026-01-19 09:28:59.8887+00
updated_at2026-01-24 15:02:22.0084+00
descriptioncreate observable for rx_core
homepagehttps://github.com/AlexAegis/rx_bevy
repositoryhttps://github.com/AlexAegis/rx_bevy
max_upload_size
id2054125
size11,255
Sandor (AlexAegis)

documentation

https://github.com/AlexAegis/rx_bevy

README

observable_create

crates.io ci codecov license

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.

See Also

Example

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
Commit count: 652

cargo fmt