pub struct KeyedStream<K>{ /* private fields */ }Expand description
A stream of events keyed by a specific field
Implementations§
Source§impl<K> KeyedStream<K>
impl<K> KeyedStream<K>
Sourcepub fn reduce<F>(self, reducer: F) -> HashMap<K, StreamEvent>
pub fn reduce<F>(self, reducer: F) -> HashMap<K, StreamEvent>
Reduce events within each key
Sourcepub fn aggregate<A>(self, aggregator: A) -> HashMap<K, AggregateResult>where
A: Aggregation + Clone,
pub fn aggregate<A>(self, aggregator: A) -> HashMap<K, AggregateResult>where
A: Aggregation + Clone,
Apply aggregation to each key group
Sourcepub fn window(self, config: WindowConfig) -> KeyedWindowedStream<K>
pub fn window(self, config: WindowConfig) -> KeyedWindowedStream<K>
Apply a window to each key group
Sourcepub fn flatten(self) -> DataStream
pub fn flatten(self) -> DataStream
Flatten back to a regular stream
Auto Trait Implementations§
impl<K> Freeze for KeyedStream<K>
impl<K> RefUnwindSafe for KeyedStream<K>where
K: RefUnwindSafe,
impl<K> Send for KeyedStream<K>where
K: Send,
impl<K> Sync for KeyedStream<K>where
K: Sync,
impl<K> Unpin for KeyedStream<K>where
K: Unpin,
impl<K> UnwindSafe for KeyedStream<K>where
K: 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