Skip to main content

WindowTrigger

Trait WindowTrigger 

Source
pub trait WindowTrigger:
    Send
    + Sync
    + Debug {
    // Provided methods
    fn on_element(&mut self, ctx: &TriggerContext) -> TriggerResult { ... }
    fn on_watermark(&mut self, ctx: &TriggerContext) -> TriggerResult { ... }
    fn on_processing_time(&mut self, ctx: &TriggerContext) -> TriggerResult { ... }
    fn clear(&mut self, window: &Window) { ... }
}
Expand description

Trait for window triggers

Provided Methods§

Source

fn on_element(&mut self, ctx: &TriggerContext) -> TriggerResult

Evaluate when an element is added to the window

Source

fn on_watermark(&mut self, ctx: &TriggerContext) -> TriggerResult

Evaluate when the watermark advances

Source

fn on_processing_time(&mut self, ctx: &TriggerContext) -> TriggerResult

Evaluate on processing time timer

Source

fn clear(&mut self, window: &Window)

Clear any state associated with the window

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§