Window

Trait Window 

Source
pub trait Window:
    Clone
    + Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn end_time(&self) -> Option<DateTime<Utc>>;
    fn start_time(&self) -> Option<DateTime<Utc>>;
    fn contains(&self, timestamp: DateTime<Utc>) -> bool;
}
Expand description

Trait for window types that can be used with WindowState.

This trait provides a common interface for different window types (e.g., TimeWindow, GlobalWindow) to be used generically.

Required Methods§

Source

fn end_time(&self) -> Option<DateTime<Utc>>

Returns the end time of the window, if applicable. Returns None for windows without a defined end (e.g., global windows).

Source

fn start_time(&self) -> Option<DateTime<Utc>>

Returns the start time of the window, if applicable.

Source

fn contains(&self, timestamp: DateTime<Utc>) -> bool

Returns true if this window contains the given timestamp.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§