pub struct PeriodicWatermarkGenerator { /* private fields */ }Expand description
Generates watermarks at fixed intervals regardless of event arrival.
Implementations§
Trait Implementations§
Source§impl Clone for PeriodicWatermarkGenerator
impl Clone for PeriodicWatermarkGenerator
Source§fn clone(&self) -> PeriodicWatermarkGenerator
fn clone(&self) -> PeriodicWatermarkGenerator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PeriodicWatermarkGenerator
impl Debug for PeriodicWatermarkGenerator
Source§impl WatermarkGenerator for PeriodicWatermarkGenerator
impl WatermarkGenerator for PeriodicWatermarkGenerator
Source§fn on_event(&mut self, timestamp: DateTime<Utc>) -> Option<Watermark>
fn on_event(&mut self, timestamp: DateTime<Utc>) -> Option<Watermark>
Called when a new element arrives with the given event timestamp.
Returns the new watermark if it should be emitted.
Source§fn on_periodic_emit(&mut self) -> Option<Watermark>
fn on_periodic_emit(&mut self) -> Option<Watermark>
Called periodically to generate watermarks even without new events.
Returns the new watermark if it should be emitted.
Source§fn current_watermark(&self) -> Watermark
fn current_watermark(&self) -> Watermark
Returns the current watermark without advancing it.
Source§fn on_end_of_stream(&mut self) -> Watermark
fn on_end_of_stream(&mut self) -> Watermark
Signals end of stream, generating the final watermark.
Auto Trait Implementations§
impl Freeze for PeriodicWatermarkGenerator
impl RefUnwindSafe for PeriodicWatermarkGenerator
impl Send for PeriodicWatermarkGenerator
impl Sync for PeriodicWatermarkGenerator
impl Unpin for PeriodicWatermarkGenerator
impl UnwindSafe for PeriodicWatermarkGenerator
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