Skip to main content

CursorTactic

Struct CursorTactic 

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

The conventional cursor-based JoinTactic.

It builds a CursorList over each input batch list and plays the merge-join out at whatever rate the driver’s fuel allows. Each prepared unit joins a B0-side cursor against a B1-side cursor, emitting (val0, val1) to logic and yielding the output containers logic fills. logic is shared across all outstanding units (an Rc<RefCell<_>>), preserving the single mutable-state semantics of one closure threaded through every match — each unit is a self-contained 'static iterator, so it cannot borrow the tactic.

It is parameterized by the builder CB into which logic pushes output; the JoinTactic it implements is over the container CB yields (CB::Container).

Implementations§

Source§

impl<B0, B1, L, CB> CursorTactic<B0, B1, L, CB>
where B0: Navigable, B1: Navigable, B1::Cursor: for<'a> Cursor<Key<'a> = <B0::Cursor as Cursor>::Key<'a>, Time = <B0::Cursor as Cursor>::Time>,

Source

pub fn new(logic: L) -> Self

Construct a tactic that applies logic to each matched (key, val0, val1).

Trait Implementations§

Source§

impl<B0, B1, L, CB> JoinTactic<<<B0 as Navigable>::Cursor as Cursor>::Time, B0, B1, <CB as ContainerBuilder>::Container> for CursorTactic<B0, B1, L, CB>
where B0: Navigable + 'static, B1: Navigable + 'static, B1::Cursor: for<'a> Cursor<Key<'a> = <B0::Cursor as Cursor>::Key<'a>, Time = <B0::Cursor as Cursor>::Time>, CB: ContainerBuilder<Container: Default> + 'static, L: for<'a> FnMut(<B0::Cursor as Cursor>::Key<'a>, <B0::Cursor as Cursor>::Val<'a>, <B1::Cursor as Cursor>::Val<'a>, <B0::Cursor as Cursor>::Time, &<B0::Cursor as Cursor>::Diff, &<B1::Cursor as Cursor>::Diff, &mut CB) + 'static,

Source§

fn prep( &mut self, input0: Vec<B0>, input1: Vec<B1>, fresh: Fresh, meet: <B0::Cursor as Cursor>::Time, ) -> Box<dyn Iterator<Item = CB::Container>>

Prepare the join of two lists of batches into an iterator of output containers. Read more

Auto Trait Implementations§

§

impl<B0, B1, L, CB> !RefUnwindSafe for CursorTactic<B0, B1, L, CB>

§

impl<B0, B1, L, CB> !Send for CursorTactic<B0, B1, L, CB>

§

impl<B0, B1, L, CB> !Sync for CursorTactic<B0, B1, L, CB>

§

impl<B0, B1, L, CB> !UnwindSafe for CursorTactic<B0, B1, L, CB>

§

impl<B0, B1, L, CB> Freeze for CursorTactic<B0, B1, L, CB>

§

impl<B0, B1, L, CB> Unpin for CursorTactic<B0, B1, L, CB>

§

impl<B0, B1, L, CB> UnsafeUnpin for CursorTactic<B0, B1, L, CB>

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.