Crate rxrust

Crate rxrust 

Source
Expand description

§rxRust: Reactive Extensions for Rust

Zero-cost, type-safe implementation of Reactive Extensions.

§Quick Start

use rxrust::prelude::*;

// Local context: No locks, optimal for single-thread
Local::from_iter(0..10)
  .filter(|v| v % 2 == 0)
  .map(|v| v * 2)
  .subscribe(|v| println!("Value: {}", v));

§Key Concepts

TypeDescription
Local / SharedExecution contexts (single-thread vs thread-safe)
ObservableThe core trait defining stream operations
ObserverConsumes next, error, and complete events
SubscriptionHandle to cancel an active subscription

§📚 Documentation

For comprehensive guides, see the Online Guide:

§Feature Flags

  • scheduler (default): Tokio-based schedulers for timing operators
  • nightly: Experimental features requiring nightly Rust

Re-exports§

pub use crate::scheduler::LocalScheduler;
pub use crate::scheduler::SharedScheduler;
pub use prelude::*;

Modules§

context
Context trait and Local/Shared implementations
factory
Observable factory pattern
observable
Observable traits and type inference
observer
Observer trait and implementations
ops
Operators
prelude
Prelude module for convenient imports
rc
Rc wrapper types for shared mutable state
scheduler
Scheduler System with Unified TaskHandle
subject
Subject implementations
subscription
Subscription trait and implementations

Structs§

Duration
A Duration type to represent a span of time, typically used for system timeouts.
Instant
A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.