pub struct WindowManager { /* private fields */ }Expand description
Generic window manager for streaming aggregations
Implementations§
Source§impl WindowManager
impl WindowManager
Sourcepub fn new(window_type: WindowType) -> Self
pub fn new(window_type: WindowType) -> Self
Create a new window manager
Sourcepub fn aggregate(
&mut self,
field: &str,
function: AggregateFunction,
output_name: &str,
) -> &mut Self
pub fn aggregate( &mut self, field: &str, function: AggregateFunction, output_name: &str, ) -> &mut Self
Add an aggregation specification
Sourcepub fn process(
&mut self,
timestamp: DateTime<Utc>,
fields: HashMap<String, KindedSlot>,
) -> Result<()>
pub fn process( &mut self, timestamp: DateTime<Utc>, fields: HashMap<String, KindedSlot>, ) -> Result<()>
Process a data point
Sourcepub fn take_completed(&mut self) -> Vec<WindowResult>
pub fn take_completed(&mut self) -> Vec<WindowResult>
Take completed windows
Sourcepub fn flush(&mut self) -> Result<Vec<WindowResult>>
pub fn flush(&mut self) -> Result<Vec<WindowResult>>
Flush any remaining windows (call at end of stream)
Auto Trait Implementations§
impl Freeze for WindowManager
impl RefUnwindSafe for WindowManager
impl Send for WindowManager
impl Sync for WindowManager
impl Unpin for WindowManager
impl UnsafeUnpin for WindowManager
impl UnwindSafe for WindowManager
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