Skip to main content

AggregationRule

Trait AggregationRule 

Source
pub trait AggregationRule {
    // Required methods
    fn aggregate(&self, events: &[StreamEvent]) -> Result<f64>;
    fn rule_name(&self) -> &str;
}
Expand description

Trait for custom aggregation rules

Required Methods§

Source

fn aggregate(&self, events: &[StreamEvent]) -> Result<f64>

Source

fn rule_name(&self) -> &str

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§