Skip to main content

CursorTactic

Struct CursorTactic 

Source
pub struct CursorTactic<B1, B2, Bu, L, P>
where B1: Navigable, B2: Navigable, for<'a> B2::Cursor: Cursor<Key<'a> = <B1::Cursor as Cursor>::Key<'a>, ValOwn: Data, Time = <<B1 as Navigable>::Cursor as Cursor>::Time>,
{ /* private fields */ }
Expand description

The conventional cursor-based ReduceTactic.

It builds a CursorList over the input, output, and new-batch updates and replays them together per key, applying logic and shaping output with push. It holds the outstanding synthetic interesting (key, time) moments across activations, and reasons only about times: capabilities are the driver’s concern. The conventional cursor-based ReduceTactic.

Implementations§

Source§

impl<B1, B2, Bu, L, P> CursorTactic<B1, B2, Bu, L, P>
where B1: Navigable, B2: Navigable, for<'a> B2::Cursor: Cursor<Key<'a> = <B1::Cursor as Cursor>::Key<'a>, ValOwn: Data, Time = <<B1 as Navigable>::Cursor as Cursor>::Time>,

Source

pub fn new(logic: L, push: P) -> Self

Construct a tactic that applies logic to each key and shapes output with push.

Trait Implementations§

Source§

impl<B1, B2, Bu, L, P> ReduceTactic<<<B1 as Navigable>::Cursor as Cursor>::Time, B1, B2> for CursorTactic<B1, B2, Bu, L, P>
where B1: Navigable, B2: Navigable, for<'a> B2::Cursor: Cursor<Key<'a> = <B1::Cursor as Cursor>::Key<'a>, ValOwn: Data, Time = <<B1 as Navigable>::Cursor as Cursor>::Time>, Bu: Builder<Time = <<B1 as Navigable>::Cursor as Cursor>::Time, Output: Into<B2>, Input: Default>, L: FnMut(<B1::Cursor as Cursor>::Key<'_>, &[(<B1::Cursor as Cursor>::Val<'_>, <B1::Cursor as Cursor>::Diff)], &mut Vec<(<B2::Cursor as Cursor>::ValOwn, <B2::Cursor as Cursor>::Diff)>, &mut Vec<(<B2::Cursor as Cursor>::ValOwn, <B2::Cursor as Cursor>::Diff)>), P: FnMut(&mut Bu::Input, <B1::Cursor as Cursor>::Key<'_>, &mut Vec<(<B2::Cursor as Cursor>::ValOwn, <<B1 as Navigable>::Cursor as Cursor>::Time, <B2::Cursor as Cursor>::Diff)>),

Source§

fn retire( &mut self, source_batches: Vec<B1>, output_batches: Vec<B2>, input_batches: Vec<B1>, lower: &Antichain<<<B1 as Navigable>::Cursor as Cursor>::Time>, upper: &Antichain<<<B1 as Navigable>::Cursor as Cursor>::Time>, held: &Antichain<<<B1 as Navigable>::Cursor as Cursor>::Time>, ) -> (Option<Span<<<B1 as Navigable>::Cursor as Cursor>::Time, B2>>, Antichain<<<B1 as Navigable>::Cursor as Cursor>::Time>)

Retire the interval [lower, upper), producing the output batch it informs. Read more

Auto Trait Implementations§

§

impl<B1, B2, Bu, L, P> Freeze for CursorTactic<B1, B2, Bu, L, P>

§

impl<B1, B2, Bu, L, P> RefUnwindSafe for CursorTactic<B1, B2, Bu, L, P>

§

impl<B1, B2, Bu, L, P> Send for CursorTactic<B1, B2, Bu, L, P>
where <<B2 as Navigable>::Cursor as Cursor>::ValOwn: for<'a> Sized, L: Send, P: Send, <<B1 as Navigable>::Cursor as Cursor>::KeyContainer: Send, <<B1 as Navigable>::Cursor as Cursor>::TimeContainer: Send, Vec<<<B1 as Navigable>::Cursor as Cursor>::Time>: Send, PhantomData<(B2, Bu)>: Send,

§

impl<B1, B2, Bu, L, P> Sync for CursorTactic<B1, B2, Bu, L, P>
where <<B2 as Navigable>::Cursor as Cursor>::ValOwn: for<'a> Sized, L: Sync, P: Sync, <<B1 as Navigable>::Cursor as Cursor>::KeyContainer: Sync, <<B1 as Navigable>::Cursor as Cursor>::TimeContainer: Sync, Vec<<<B1 as Navigable>::Cursor as Cursor>::Time>: Sync, PhantomData<(B2, Bu)>: Sync,

§

impl<B1, B2, Bu, L, P> Unpin for CursorTactic<B1, B2, Bu, L, P>
where <<B2 as Navigable>::Cursor as Cursor>::ValOwn: for<'a> Sized, L: Unpin, P: Unpin, <<B1 as Navigable>::Cursor as Cursor>::KeyContainer: Unpin, <<B1 as Navigable>::Cursor as Cursor>::TimeContainer: Unpin, Vec<<<B1 as Navigable>::Cursor as Cursor>::Time>: Unpin, PhantomData<(B2, Bu)>: Unpin,

§

impl<B1, B2, Bu, L, P> UnsafeUnpin for CursorTactic<B1, B2, Bu, L, P>

§

impl<B1, B2, Bu, L, P> UnwindSafe for CursorTactic<B1, B2, Bu, L, P>

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<'a, S, T> Semigroup<&'a S> for T
where T: Semigroup<S>,

Source§

fn plus_equals(&mut self, rhs: &&'a S)

The method of std::ops::AddAssign, for types that do not implement AddAssign.
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.