pub enum StreamWindow {
Count(usize),
Duration(Duration),
}Expand description
Tumbling-window trigger: how often flush_window fires and
how much the driver buffers. Defaults to per-item (Count(1));
larger windows amortise flush + checkpoint cost.
Variants§
Count(usize)
Flush after this many successfully processed items (clamped to a minimum of 1).
The cursor committed for this window is the Cursor of the last item processed
in the batch.
Duration(Duration)
Flush after this much wall-clock elapses, tumbling — clamped to a minimum of 1ms
(a zero duration would otherwise starve the source; see the clamp in the driver).
Empty windows are skipped (no flush_window call) so
an idle source does not emit spurious empty flushes. When the window finally
contains items, the cursor committed is the Cursor of the last item processed
during that interval. Unlike Count, buffering is bounded
only by what the source yields during the interval.
Trait Implementations§
Source§impl Clone for StreamWindow
impl Clone for StreamWindow
Source§fn clone(&self) -> StreamWindow
fn clone(&self) -> StreamWindow
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more