fluxion-core
Part of Fluxion - A reactive stream processing library for Rust
Core traits and types for ordered stream processing in async Rust.
Overview
This crate provides the foundational abstractions used throughout the Fluxion ecosystem:
Timestampedtrait: Temporal ordering for stream items via timestampsStreamItem<T>: Error-aware stream item wrapper- Lock utilities: Safe mutex operations with error propagation
Key Types
Timestamped Trait
The Timestamped trait enables temporal ordering guarantees across stream operations:
Sequenced
A ready-to-use implementation of Timestamped using monotonically growing sequence numbers (available in fluxion-test-utils):
use Sequenced;
use Timestamped;
let item = new;
assert_eq!;
// Timestamp uses chrono::Utc::now()
Lock Utilities
Safe mutex lock acquisition with error propagation:
use lock_or_error;
use ;
let mutex = new;
let mut guard = lock_or_error?;
guard.push;
Usage
Add this to your Cargo.toml:
[]
= "0.2.2"
License
Apache-2.0