Skip to main content

WindowAssigner

Trait WindowAssigner 

Source
pub trait WindowAssigner:
    Send
    + Sync
    + Debug {
    // Required method
    fn assign_windows(&self, timestamp: DateTime<Utc>) -> Vec<Window>;

    // Provided methods
    fn max_windows_per_event(&self) -> usize { ... }
    fn is_session_window(&self) -> bool { ... }
}
Expand description

Trait for assigning events to windows

Required Methods§

Source

fn assign_windows(&self, timestamp: DateTime<Utc>) -> Vec<Window>

Assign a timestamp to one or more windows

Provided Methods§

Source

fn max_windows_per_event(&self) -> usize

Get the maximum number of windows an event can be assigned to

Source

fn is_session_window(&self) -> bool

Check if this is a session window assigner (requires merging)

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§