pub struct Aggregator { /* private fields */ }Expand description
Aggregator for performing calculations on event streams
Implementations§
Source§impl Aggregator
impl Aggregator
Sourcepub fn new(aggregation_type: AggregationType) -> Self
pub fn new(aggregation_type: AggregationType) -> Self
Create a new aggregator
Sourcepub fn aggregate(&self, window: &TimeWindow) -> AggregationResult
pub fn aggregate(&self, window: &TimeWindow) -> AggregationResult
Perform aggregation on a time window
Sourcepub fn aggregate_events(&self, events: &[StreamEvent]) -> AggregationResult
pub fn aggregate_events(&self, events: &[StreamEvent]) -> AggregationResult
Perform aggregation on a slice of events
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Aggregator
impl RefUnwindSafe for Aggregator
impl Send for Aggregator
impl Sync for Aggregator
impl Unpin for Aggregator
impl UnwindSafe for Aggregator
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