pub struct CombinedState<V, TS = u64>{ /* private fields */ }Expand description
State container holding the latest values from multiple combined streams.
Used by operators that combine multiple streams such as combine_latest,
with_latest_from, and
emit_when.
§Examples
use fluxion_stream::CombinedState;
let state = CombinedState::new(vec![1, 2, 3], 0);
assert_eq!(state.values().len(), 3);
assert_eq!(state.values()[0], 1);Implementations§
Trait Implementations§
Source§impl<V, TS> Clone for CombinedState<V, TS>
impl<V, TS> Clone for CombinedState<V, TS>
Source§fn clone(&self) -> CombinedState<V, TS>
fn clone(&self) -> CombinedState<V, TS>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<V, TS> Debug for CombinedState<V, TS>
impl<V, TS> Debug for CombinedState<V, TS>
Source§impl<V, TS> HasTimestamp for CombinedState<V, TS>
impl<V, TS> HasTimestamp for CombinedState<V, TS>
Source§type Inner = CombinedState<V, TS>
type Inner = CombinedState<V, TS>
The type of the inner value wrapped by this timestamped type
Source§impl<V, TS> Ord for CombinedState<V, TS>
impl<V, TS> Ord for CombinedState<V, TS>
Source§fn cmp(&self, other: &CombinedState<V, TS>) -> Ordering
fn cmp(&self, other: &CombinedState<V, TS>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<V, TS> PartialEq for CombinedState<V, TS>
impl<V, TS> PartialEq for CombinedState<V, TS>
Source§impl<V, TS> PartialOrd for CombinedState<V, TS>
impl<V, TS> PartialOrd for CombinedState<V, TS>
Source§impl<V, TS> Timestamped for CombinedState<V, TS>
impl<V, TS> Timestamped for CombinedState<V, TS>
Source§fn with_timestamp(value: Self::Inner, timestamp: Self::Timestamp) -> Self
fn with_timestamp(value: Self::Inner, timestamp: Self::Timestamp) -> Self
Creates a new instance wrapping the given value with the specified timestamp.
Source§fn with_fresh_timestamp(value: Self::Inner) -> Self
fn with_fresh_timestamp(value: Self::Inner) -> Self
Creates a new instance wrapping the given value with a fresh timestamp.
This is called by operators when emitting new values.
Each implementation determines how to generate fresh timestamps
(e.g., Utc::now() for chrono, atomic counter for u64, etc.)
Source§fn into_inner(self) -> Self::Inner
fn into_inner(self) -> Self::Inner
Consumes self and returns the inner value.
For wrapper types like
Sequenced<T>, this extracts T.
For domain types where Inner = Self, this typically returns self.impl<V, TS> Eq for CombinedState<V, TS>
impl<V, TS> StructuralPartialEq for CombinedState<V, TS>
Auto Trait Implementations§
impl<V, TS> Freeze for CombinedState<V, TS>where
TS: Freeze,
impl<V, TS> RefUnwindSafe for CombinedState<V, TS>where
TS: RefUnwindSafe,
V: RefUnwindSafe,
impl<V, TS> Send for CombinedState<V, TS>
impl<V, TS> Sync for CombinedState<V, TS>
impl<V, TS> Unpin for CombinedState<V, TS>
impl<V, TS> UnwindSafe for CombinedState<V, TS>where
TS: UnwindSafe,
V: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more