pub struct IncrementalWindow<IN, OUT, INIT, AGG, B>where
IN: ArconType,
OUT: ArconType,
INIT: Fn(IN) -> OUT + ArconFnBounds,
AGG: Fn(IN, &OUT) -> OUT + ArconFnBounds,
B: Backend,{ /* private fields */ }Expand description
A window index that incrementally aggregates elements
Used for associative and commutative operations
Implementations§
Trait Implementations§
Source§impl<IN, OUT, INIT, AGG, B> IndexOps for IncrementalWindow<IN, OUT, INIT, AGG, B>
impl<IN, OUT, INIT, AGG, B> IndexOps for IncrementalWindow<IN, OUT, INIT, AGG, B>
Source§fn persist(&mut self) -> ArconResult<()>
fn persist(&mut self) -> ArconResult<()>
This method ensures all non-persisted data gets pushed to a Backend
Source§fn table(&mut self) -> ArconResult<Option<ImmutableTable>>
fn table(&mut self) -> ArconResult<Option<ImmutableTable>>
Create a [ImmutableTable] from the data in the Index
Source§impl<IN, OUT, INIT, AGG, B> WindowIndex for IncrementalWindow<IN, OUT, INIT, AGG, B>
impl<IN, OUT, INIT, AGG, B> WindowIndex for IncrementalWindow<IN, OUT, INIT, AGG, B>
type IN = IN
type OUT = OUT
Source§fn on_element(
&mut self,
element: Self::IN,
ctx: WindowContext,
) -> ArconResult<()>
fn on_element( &mut self, element: Self::IN, ctx: WindowContext, ) -> ArconResult<()>
The
on_element function is called per received window elementSource§fn result(&mut self, ctx: WindowContext) -> ArconResult<Self::OUT>
fn result(&mut self, ctx: WindowContext) -> ArconResult<Self::OUT>
The
result function is called at the end of a window’s lifetimeSource§fn clear(&mut self, ctx: WindowContext) -> ArconResult<()>
fn clear(&mut self, ctx: WindowContext) -> ArconResult<()>
Clears the window state for the passed context
Auto Trait Implementations§
impl<IN, OUT, INIT, AGG, B> !Freeze for IncrementalWindow<IN, OUT, INIT, AGG, B>
impl<IN, OUT, INIT, AGG, B> !RefUnwindSafe for IncrementalWindow<IN, OUT, INIT, AGG, B>
impl<IN, OUT, INIT, AGG, B> Send for IncrementalWindow<IN, OUT, INIT, AGG, B>
impl<IN, OUT, INIT, AGG, B> !Sync for IncrementalWindow<IN, OUT, INIT, AGG, B>
impl<IN, OUT, INIT, AGG, B> Unpin for IncrementalWindow<IN, OUT, INIT, AGG, B>
impl<IN, OUT, INIT, AGG, B> UnwindSafe for IncrementalWindow<IN, OUT, INIT, AGG, B>where
B: RefUnwindSafe,
INIT: UnwindSafe,
AGG: UnwindSafe,
IN: UnwindSafe,
OUT: UnwindSafe,
<AGG as FnOnce(IN, &OUT)>::Output == OUT,
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