pub enum WindowPolicy {
Tumbling {
size: Duration,
},
Sliding {
size: Duration,
slide: Duration,
},
Session {
idle: Duration,
},
}Available on crate feature
std only.Expand description
Window emission strategy.
Pass to crate::PipelineBuilder::window to install a windowing
stage. The carrier type changes from T to Window<T> after
the call.
Variants§
Tumbling
Fixed-width, non-overlapping windows. The first window starts
when the first item arrives; subsequent windows are anchored
at multiples of size from that point.
Sliding
Overlapping windows of width size. A new window starts every
slide interval. Each item is duplicated into every active
window, so the item type must be Clone.
Session
Adaptive window that stays open as long as new items arrive
within idle. Closes (and emits) on the next item arriving
after idle has elapsed since the last item, or at
end-of-stream.
Trait Implementations§
Source§impl Clone for WindowPolicy
impl Clone for WindowPolicy
Source§fn clone(&self) -> WindowPolicy
fn clone(&self) -> WindowPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 WindowPolicy
impl Debug for WindowPolicy
Source§impl PartialEq for WindowPolicy
impl PartialEq for WindowPolicy
Source§fn eq(&self, other: &WindowPolicy) -> bool
fn eq(&self, other: &WindowPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for WindowPolicy
impl Eq for WindowPolicy
impl StructuralPartialEq for WindowPolicy
Auto Trait Implementations§
impl Freeze for WindowPolicy
impl RefUnwindSafe for WindowPolicy
impl Send for WindowPolicy
impl Sync for WindowPolicy
impl Unpin for WindowPolicy
impl UnsafeUnpin for WindowPolicy
impl UnwindSafe for WindowPolicy
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