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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more