fluxion-stream
Part of Fluxion - A reactive stream processing library for Rust
Stream combinators for async Rust with strong temporal-ordering guarantees. This crate provides composable operators and lightweight sequencing utilities designed for correctness and performance in event-driven systems.
Key features
- Temporal ordering via
Orderedtrait and sequence numbers - Composable operators:
combine_latest,with_latest_from,ordered_merge,take_latest_when,take_while_with, and more - Efficient implementation with minimal allocations
- Integration with tokio streams
Core concepts
Ordered Trait
The Ordered trait is central to fluxion-stream. It provides a temporal ordering mechanism for stream items:
Stream Operators
All operators preserve temporal ordering and handle concurrent streams correctly.
Quick Examples
Basic Stream Creation
use FluxionStream;
use StreamExt;
async
Combining Streams with ordered_merge
use ;
use Sequenced;
use StreamExt;
async
Using combine_latest
use ;
use StreamExt;
// Combine multiple streams, emitting when any stream emits
// (after all have emitted at least once)
let combined = stream1.combine_latest;
Core modules
fluxion_stream� MainFluxionStreamtype with extension methods- Operator modules:
combine_latest,ordered_merge,with_latest_from,take_latest_when,take_while_with,emit_when,combine_with_previous
Running tests
cargo test --package fluxion-stream --all-features --all-targets
Documentation
cargo doc --package fluxion-stream --no-deps --open
License
Apache-2.0