pub struct WatermarkGenerator { /* private fields */ }Expand description
Watermark generator that tracks event-time progress
Implementations§
Source§impl WatermarkGenerator
impl WatermarkGenerator
Sourcepub fn new(strategy: WatermarkStrategy) -> Self
pub fn new(strategy: WatermarkStrategy) -> Self
Create a new watermark generator with the given strategy
Sourcepub fn process_event(&mut self, event: &StreamEvent) -> Option<Watermark>
pub fn process_event(&mut self, event: &StreamEvent) -> Option<Watermark>
Process an event and update watermark if needed
Sourcepub fn current_watermark(&self) -> Watermark
pub fn current_watermark(&self) -> Watermark
Get the current watermark
Sourcepub fn is_late(&self, event: &StreamEvent) -> bool
pub fn is_late(&self, event: &StreamEvent) -> bool
Check if an event is late
Auto Trait Implementations§
impl Freeze for WatermarkGenerator
impl RefUnwindSafe for WatermarkGenerator
impl Send for WatermarkGenerator
impl Sync for WatermarkGenerator
impl Unpin for WatermarkGenerator
impl UnwindSafe for WatermarkGenerator
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