rx_core_observable_zip

Crates.iorx_core_observable_zip
lib.rsrx_core_observable_zip
version0.2.0
created_at2026-01-19 11:26:11.998805+00
updated_at2026-01-24 15:03:52.973427+00
descriptionzip observable for rx_core
homepagehttps://github.com/AlexAegis/rx_bevy
repositoryhttps://github.com/AlexAegis/rx_bevy
max_upload_size
id2054338
size17,675
Sandor (AlexAegis)

documentation

https://github.com/AlexAegis/rx_bevy

README

observable_zip

crates.io ci codecov license

Subscribes to two observables, emitting paired tuples when both have emitted, matching them in emission order.

See Also

  • CombineChangesObservable - Emits the latest of two sources, tagging which side changed, even before both have emitted.
  • CombineLatestObservable - Emits the latest of two sources whenever either emits, after both emitted at least once.
  • JoinObservable - Emits the last values from both sources once both have completed.

Example

cargo run -p rx_core --example observable_zip_example
let observable_1 = (1..=3).into_observable();
let observable_2 = (4..=6).into_observable();

let _subscription = zip(observable_1, observable_2)
    .subscribe(PrintObserver::new("zip_observable"));

Output:

zip_observable - next: (1, 4)
zip_observable - next: (2, 5)
zip_observable - next: (3, 6)
zip_observable - completed
zip_observable - unsubscribed
Commit count: 652

cargo fmt