pub struct GroupedStream<K>{ /* private fields */ }Expand description
Grouped stream for aggregations
Implementations§
Source§impl<K> GroupedStream<K>
impl<K> GroupedStream<K>
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 group
Sourcepub fn first(self) -> HashMap<K, StreamEvent>
pub fn first(self) -> HashMap<K, StreamEvent>
Get the first event in each group
Sourcepub fn last(self) -> HashMap<K, StreamEvent>
pub fn last(self) -> HashMap<K, StreamEvent>
Get the last event in each group
Auto Trait Implementations§
impl<K> Freeze for GroupedStream<K>
impl<K> RefUnwindSafe for GroupedStream<K>where
K: RefUnwindSafe,
impl<K> Send for GroupedStream<K>where
K: Send,
impl<K> Sync for GroupedStream<K>where
K: Sync,
impl<K> Unpin for GroupedStream<K>where
K: Unpin,
impl<K> UnwindSafe for GroupedStream<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