IncrementalWindow

Struct IncrementalWindow 

Source
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§

Source§

impl<IN, OUT, INIT, AGG, B> IncrementalWindow<IN, OUT, INIT, AGG, B>
where IN: ArconType, OUT: ArconType, INIT: Fn(IN) -> OUT + ArconFnBounds, AGG: Fn(IN, &OUT) -> OUT + ArconFnBounds, B: Backend,

Source

pub fn new(backend: Arc<B>, init: INIT, agg: AGG) -> Self

Trait Implementations§

Source§

impl<IN, OUT, INIT, AGG, B> IndexOps for IncrementalWindow<IN, OUT, INIT, AGG, B>
where IN: ArconType, OUT: ArconType, INIT: Fn(IN) -> OUT + ArconFnBounds, AGG: Fn(IN, &OUT) -> OUT + ArconFnBounds, B: Backend,

Source§

fn persist(&mut self) -> ArconResult<()>

This method ensures all non-persisted data gets pushed to a Backend
Source§

fn set_key(&mut self, _: u64)

Set the current active key for the index
Source§

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>
where IN: ArconType, OUT: ArconType, INIT: Fn(IN) -> OUT + ArconFnBounds, AGG: Fn(IN, &OUT) -> OUT + ArconFnBounds, B: Backend,

Source§

type IN = IN

Source§

type OUT = OUT

Source§

fn on_element( &mut self, element: Self::IN, ctx: WindowContext, ) -> ArconResult<()>

The on_element function is called per received window element
Source§

fn result(&mut self, ctx: WindowContext) -> ArconResult<Self::OUT>

The result function is called at the end of a window’s lifetime
Source§

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>
where <AGG as FnOnce(IN, &OUT)>::Output == OUT,

§

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>
where INIT: Unpin, AGG: Unpin, IN: Unpin, OUT: Unpin, <AGG as FnOnce(IN, &OUT)>::Output == OUT,

§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> Erased for T