[][src]Crate rxrust

Reactive extensions library for Rust: a library for Reactive Programming using Observables, to make it easier to compose asynchronous or callback-based code.

There are two core abstractions that are unique to RxRust:

  • IntoShared: By default, RxRust always provides a single thread version to get the best performance, but a thread-safe implementation also exists. The trait IntoShared will convert a local-thread struct to thread-safe version. So we can call to_shared method to ensure operators or subscription can shared between threads.
  • Fork: In Rxrust all operators consume the upstream except Fork, so operators always combine a single-chain and can only subscribe once. We use Fork to fork the stream.

Modules

observable
ops
prelude
scheduler
subject
subscribable
subscriber
subscription

Macros

empty
from_future

Converts a Future to an observable sequence. Even though if the future poll value has Result::Err type, also emit as a normal value, not trigger to error handle.

from_future_with_err

Converts a Future to an observable sequence like [from_future]. But only work for which Future::Output is Result type, and Result::Ok emit to next handle, and Result::Err as an error to handle.

from_iter
inner_add
inner_unsubscribe
interval

Creates an observable which will fire at dur time into the future, and will repeat every dur interval after.

interval_at

Creates a observable which will fire at the time specified by at, and then will repeat every dur interval after

interval_observable
merge_subscribe
of