pub trait WindowAssigner: Send {
// Required method
fn assign_windows(&self, timestamp: i64) -> WindowIdVec;
// Provided method
fn max_timestamp(&self, window_end: i64) -> i64 { ... }
}Expand description
Trait for assigning events to windows.
Required Methods§
Sourcefn assign_windows(&self, timestamp: i64) -> WindowIdVec
fn assign_windows(&self, timestamp: i64) -> WindowIdVec
Assigns an event timestamp to zero or more windows.
For tumbling windows, this returns exactly one window. For sliding windows, this may return multiple windows.
Provided Methods§
Sourcefn max_timestamp(&self, window_end: i64) -> i64
fn max_timestamp(&self, window_end: i64) -> i64
Returns the maximum timestamp that could still be assigned to a window
ending at window_end.
Used for determining when a window can be safely triggered.