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
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