pub struct Aggregate {
pub key_field: String,
pub value_field: String,
pub op: AggregationKind,
/* private fields */
}Expand description
Simple aggregate that maintains a per-minute count per key_field.
Simple aggregate that maintains a per-minute count per key_field.
Example
use pulse_ops::Aggregate;
let agg = Aggregate::count_per_window("key", "word");Fields§
§key_field: String§value_field: String§op: AggregationKindImplementations§
Trait Implementations§
Source§impl Operator for Aggregate
impl Operator for Aggregate
fn on_element<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut dyn Context,
rec: Record,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_watermark<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 mut dyn Context,
_wm: Watermark,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_timer<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 mut dyn Context,
_when: EventTime,
_key: Option<Vec<u8>>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations§
impl Freeze for Aggregate
impl RefUnwindSafe for Aggregate
impl Send for Aggregate
impl Sync for Aggregate
impl Unpin for Aggregate
impl UnsafeUnpin for Aggregate
impl UnwindSafe for Aggregate
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