rx_core_operator_delay

Crates.iorx_core_operator_delay
lib.rsrx_core_operator_delay
version0.2.0
created_at2026-01-19 13:06:56.415375+00
updated_at2026-01-24 15:05:29.969137+00
descriptiondelay operator for rx_core
homepagehttps://github.com/AlexAegis/rx_bevy
repositoryhttps://github.com/AlexAegis/rx_bevy
max_upload_size
id2054595
size21,086
Sandor (AlexAegis)

documentation

https://github.com/AlexAegis/rx_bevy

README

operator_delay

crates.io ci codecov license

The delay operator shifts upstream values forward in time by a specified duration.

Upstream completion and cancellation can happen instantly if there are no pending delayed values, otherwise it will complete or cancel once all delayed values have been emitted.

Upstream errors are immediately propagated downstream, cancelling any pending delayed values.

See Also

Example

cargo run -p rx_core --example operator_delay_example
let mut executor = MockExecutor::new_with_logging();
let scheduler = executor.get_scheduler_handle();
let _subscription = (1..=3)
    .into_observable()
    .delay(Duration::from_millis(1000), scheduler)
    .subscribe(PrintObserver::new("delay_operator"));
executor.tick(Duration::from_millis(1000));

Output:

Ticking... (1s)
delay_operator - next: 1
delay_operator - next: 2
delay_operator - next: 3
delay_operator - completed
delay_operator - unsubscribed
Commit count: 652

cargo fmt