rx_core_operator_finalize

Crates.iorx_core_operator_finalize
lib.rsrx_core_operator_finalize
version0.2.0
created_at2026-01-19 14:50:40.458573+00
updated_at2026-01-24 15:07:06.203317+00
descriptionfinalize operator for rx_core
homepagehttps://github.com/AlexAegis/rx_bevy
repositoryhttps://github.com/AlexAegis/rx_bevy
max_upload_size
id2054745
size12,221
Sandor (AlexAegis)

documentation

https://github.com/AlexAegis/rx_bevy

README

operator_finalize

crates.io ci codecov license

Execute cleanup when the observable finishes or unsubscribes.

See Also

  • TapOperator - Mirror all signals into another observer.
  • TapNextOperator - Run a callback for each next value while letting signals pass through.
  • OnNextOperator - Invoke a callback for each value that can also decide whether to forward it.
  • OnSubscribeOperator - Run a callback when a subscription is established.

Example

cargo run -p rx_core --example operator_finalize_completion_example
let _subscription = just(12)
    .finalize(|| println!("finally!"))
    .subscribe(PrintObserver::new("finalize_operator"));

Output:

finalize_operator - next: 12
finalize_operator - completed
finally!
finalize_operator - unsubscribed
Commit count: 652

cargo fmt