pub struct MonotonicWatermarkGenerator { /* private fields */ }Expand description
Generates watermarks that follow the maximum observed timestamp exactly.
This is suitable for streams where events arrive in order.
Implementations§
Trait Implementations§
Source§impl Clone for MonotonicWatermarkGenerator
impl Clone for MonotonicWatermarkGenerator
Source§fn clone(&self) -> MonotonicWatermarkGenerator
fn clone(&self) -> MonotonicWatermarkGenerator
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 MonotonicWatermarkGenerator
impl Debug for MonotonicWatermarkGenerator
Source§impl WatermarkGenerator for MonotonicWatermarkGenerator
impl WatermarkGenerator for MonotonicWatermarkGenerator
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 MonotonicWatermarkGenerator
impl RefUnwindSafe for MonotonicWatermarkGenerator
impl Send for MonotonicWatermarkGenerator
impl Sync for MonotonicWatermarkGenerator
impl Unpin for MonotonicWatermarkGenerator
impl UnwindSafe for MonotonicWatermarkGenerator
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