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