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§
Sourcefn end_time(&self) -> Option<DateTime<Utc>>
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).
Sourcefn start_time(&self) -> Option<DateTime<Utc>>
fn start_time(&self) -> Option<DateTime<Utc>>
Returns the start time of the window, if applicable.
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.