pub struct CountWindow { /* private fields */ }Expand description
A count-based window that emits after collecting N events.
Supports both row-oriented and columnar access patterns:
flush_shared(): Row-oriented access for backward compatibilityflush_columnar(): Columnar access for SIMD-optimized aggregations
Implementations§
Source§impl CountWindow
impl CountWindow
pub fn new(count: usize) -> Self
Add a shared event, returning completed window if count reached.
Flush all events as SharedEvent references.
Sourcepub fn flush_columnar(&mut self) -> ColumnarBuffer
pub fn flush_columnar(&mut self) -> ColumnarBuffer
Flush and return the columnar buffer for SIMD-optimized aggregations.
Sourcepub const fn current_count(&self) -> usize
pub const fn current_count(&self) -> usize
Get current count of events in buffer (for debugging)
Sourcepub fn checkpoint(&self) -> WindowCheckpoint
pub fn checkpoint(&self) -> WindowCheckpoint
Create a checkpoint of the current window state.
Sourcepub fn restore(&mut self, cp: &WindowCheckpoint)
pub fn restore(&mut self, cp: &WindowCheckpoint)
Restore window state from a checkpoint.
Trait Implementations§
Source§impl ColumnarAccess for CountWindow
impl ColumnarAccess for CountWindow
Source§fn columnar(&self) -> &ColumnarBuffer
fn columnar(&self) -> &ColumnarBuffer
Get a reference to the columnar buffer.
Source§fn columnar_mut(&mut self) -> &mut ColumnarBuffer
fn columnar_mut(&mut self) -> &mut ColumnarBuffer
Get a mutable reference to the columnar buffer.
Source§fn get_float_column(&mut self, field: &str) -> &[f64]
fn get_float_column(&mut self, field: &str) -> &[f64]
Get a float column, ensuring it exists.
Source§fn get_int_column(&mut self, field: &str) -> &[i64]
fn get_int_column(&mut self, field: &str) -> &[i64]
Get an int column, ensuring it exists.
Auto Trait Implementations§
impl Freeze for CountWindow
impl RefUnwindSafe for CountWindow
impl Send for CountWindow
impl Sync for CountWindow
impl Unpin for CountWindow
impl UnsafeUnpin for CountWindow
impl UnwindSafe for CountWindow
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more