Trait differential_dataflow::trace::cursor::Cursor

source ·
pub trait Cursor {
    type Key<'a>: Copy + Clone + Ord;
    type Val<'a>: Copy + Clone + Ord;
    type Time: Timestamp + Lattice + Ord + Clone;
    type TimeGat<'a>: Copy + IntoOwned<'a, Owned = Self::Time>;
    type Diff: Semigroup + 'static;
    type DiffGat<'a>: Copy + IntoOwned<'a, Owned = Self::Diff>;
    type Storage;

Show 14 methods // Required methods fn key_valid(&self, storage: &Self::Storage) -> bool; fn val_valid(&self, storage: &Self::Storage) -> bool; fn key<'a>(&self, storage: &'a Self::Storage) -> Self::Key<'a>; fn val<'a>(&self, storage: &'a Self::Storage) -> Self::Val<'a>; fn map_times<L: FnMut(Self::TimeGat<'_>, Self::DiffGat<'_>)>( &mut self, storage: &Self::Storage, logic: L, ); fn step_key(&mut self, storage: &Self::Storage); fn seek_key(&mut self, storage: &Self::Storage, key: Self::Key<'_>); fn step_val(&mut self, storage: &Self::Storage); fn seek_val(&mut self, storage: &Self::Storage, val: Self::Val<'_>); fn rewind_keys(&mut self, storage: &Self::Storage); fn rewind_vals(&mut self, storage: &Self::Storage); // Provided methods fn get_key<'a>(&self, storage: &'a Self::Storage) -> Option<Self::Key<'a>> { ... } fn get_val<'a>(&self, storage: &'a Self::Storage) -> Option<Self::Val<'a>> { ... } fn to_vec<K, V>( &mut self, storage: &Self::Storage, ) -> Vec<((K, V), Vec<(Self::Time, Self::Diff)>)> where for<'a> Self::Key<'a>: IntoOwned<'a, Owned = K>, for<'a> Self::Val<'a>: IntoOwned<'a, Owned = V> { ... }
}
Expand description

A cursor for navigating ordered (key, val, time, diff) updates.

Required Associated Types§

source

type Key<'a>: Copy + Clone + Ord

Key by which updates are indexed.

source

type Val<'a>: Copy + Clone + Ord

Values associated with keys.

source

type Time: Timestamp + Lattice + Ord + Clone

Timestamps associated with updates

source

type TimeGat<'a>: Copy + IntoOwned<'a, Owned = Self::Time>

Borrowed form of timestamp.

source

type Diff: Semigroup + 'static

Owned form of update difference.

source

type DiffGat<'a>: Copy + IntoOwned<'a, Owned = Self::Diff>

Borrowed form of update difference.

source

type Storage

Storage required by the cursor.

Required Methods§

source

fn key_valid(&self, storage: &Self::Storage) -> bool

Indicates if the current key is valid.

A value of false indicates that the cursor has exhausted all keys.

source

fn val_valid(&self, storage: &Self::Storage) -> bool

Indicates if the current value is valid.

A value of false indicates that the cursor has exhausted all values for this key.

source

fn key<'a>(&self, storage: &'a Self::Storage) -> Self::Key<'a>

A reference to the current key. Asserts if invalid.

source

fn val<'a>(&self, storage: &'a Self::Storage) -> Self::Val<'a>

A reference to the current value. Asserts if invalid.

source

fn map_times<L: FnMut(Self::TimeGat<'_>, Self::DiffGat<'_>)>( &mut self, storage: &Self::Storage, logic: L, )

Applies logic to each pair of time and difference. Intended for mutation of the closure’s scope.

source

fn step_key(&mut self, storage: &Self::Storage)

Advances the cursor to the next key.

source

fn seek_key(&mut self, storage: &Self::Storage, key: Self::Key<'_>)

Advances the cursor to the specified key.

source

fn step_val(&mut self, storage: &Self::Storage)

Advances the cursor to the next value.

source

fn seek_val(&mut self, storage: &Self::Storage, val: Self::Val<'_>)

Advances the cursor to the specified value.

source

fn rewind_keys(&mut self, storage: &Self::Storage)

Rewinds the cursor to the first key.

source

fn rewind_vals(&mut self, storage: &Self::Storage)

Rewinds the cursor to the first value for current key.

Provided Methods§

source

fn get_key<'a>(&self, storage: &'a Self::Storage) -> Option<Self::Key<'a>>

Returns a reference to the current key, if valid.

source

fn get_val<'a>(&self, storage: &'a Self::Storage) -> Option<Self::Val<'a>>

Returns a reference to the current value, if valid.

source

fn to_vec<K, V>( &mut self, storage: &Self::Storage, ) -> Vec<((K, V), Vec<(Self::Time, Self::Diff)>)>
where for<'a> Self::Key<'a>: IntoOwned<'a, Owned = K>, for<'a> Self::Val<'a>: IntoOwned<'a, Owned = V>,

Rewinds the cursor and outputs its contents to a Vec

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<C, F> Cursor for CursorFilter<C, F>
where C: Cursor, F: FnMut(C::Key<'_>, C::Val<'_>) -> bool + 'static,

§

type Key<'a> = <C as Cursor>::Key<'a>

§

type Val<'a> = <C as Cursor>::Val<'a>

§

type Time = <C as Cursor>::Time

§

type TimeGat<'a> = <C as Cursor>::TimeGat<'a>

§

type Diff = <C as Cursor>::Diff

§

type DiffGat<'a> = <C as Cursor>::DiffGat<'a>

§

type Storage = <C as Cursor>::Storage

source§

impl<C, F> Cursor for CursorFreeze<C, F>
where C: Cursor, F: Fn(C::TimeGat<'_>) -> Option<C::Time>,

§

type Key<'a> = <C as Cursor>::Key<'a>

§

type Val<'a> = <C as Cursor>::Val<'a>

§

type Time = <C as Cursor>::Time

§

type TimeGat<'a> = <C as Cursor>::TimeGat<'a>

§

type Diff = <C as Cursor>::Diff

§

type DiffGat<'a> = <C as Cursor>::DiffGat<'a>

§

type Storage = <C as Cursor>::Storage

source§

impl<C, TInner> Cursor for differential_dataflow::trace::wrappers::enter::CursorEnter<C, TInner>
where C: Cursor, TInner: Refines<C::Time> + Lattice,

§

type Key<'a> = <C as Cursor>::Key<'a>

§

type Val<'a> = <C as Cursor>::Val<'a>

§

type Time = TInner

§

type TimeGat<'a> = &'a TInner

§

type Diff = <C as Cursor>::Diff

§

type DiffGat<'a> = <C as Cursor>::DiffGat<'a>

§

type Storage = <C as Cursor>::Storage

source§

impl<C, TInner, F> Cursor for differential_dataflow::trace::wrappers::enter_at::CursorEnter<C, TInner, F>
where C: Cursor, TInner: Refines<C::Time> + Lattice, F: FnMut(C::Key<'_>, C::Val<'_>, C::TimeGat<'_>) -> TInner,

§

type Key<'a> = <C as Cursor>::Key<'a>

§

type Val<'a> = <C as Cursor>::Val<'a>

§

type Time = TInner

§

type TimeGat<'a> = &'a TInner

§

type Diff = <C as Cursor>::Diff

§

type DiffGat<'a> = <C as Cursor>::DiffGat<'a>

§

type Storage = <C as Cursor>::Storage

source§

impl<C: Cursor> Cursor for RcBatchCursor<C>

§

type Key<'a> = <C as Cursor>::Key<'a>

§

type Val<'a> = <C as Cursor>::Val<'a>

§

type Time = <C as Cursor>::Time

§

type TimeGat<'a> = <C as Cursor>::TimeGat<'a>

§

type Diff = <C as Cursor>::Diff

§

type DiffGat<'a> = <C as Cursor>::DiffGat<'a>

§

type Storage = Rc<<C as Cursor>::Storage>

source§

impl<C: Cursor> Cursor for BatchCursorFrontier<C>
where C::Storage: BatchReader,

§

type Key<'a> = <C as Cursor>::Key<'a>

§

type Val<'a> = <C as Cursor>::Val<'a>

§

type Time = <C as Cursor>::Time

§

type TimeGat<'a> = <C as Cursor>::TimeGat<'a>

§

type Diff = <C as Cursor>::Diff

§

type DiffGat<'a> = <C as Cursor>::DiffGat<'a>

§

type Storage = BatchFrontier<<C as Cursor>::Storage>

source§

impl<C: Cursor> Cursor for CursorFrontier<C, C::Time>

§

type Key<'a> = <C as Cursor>::Key<'a>

§

type Val<'a> = <C as Cursor>::Val<'a>

§

type Time = <C as Cursor>::Time

§

type TimeGat<'a> = <C as Cursor>::TimeGat<'a>

§

type Diff = <C as Cursor>::Diff

§

type DiffGat<'a> = <C as Cursor>::DiffGat<'a>

§

type Storage = <C as Cursor>::Storage

source§

impl<C: Cursor> Cursor for CursorList<C>

§

type Key<'a> = <C as Cursor>::Key<'a>

§

type Val<'a> = <C as Cursor>::Val<'a>

§

type Time = <C as Cursor>::Time

§

type TimeGat<'a> = <C as Cursor>::TimeGat<'a>

§

type Diff = <C as Cursor>::Diff

§

type DiffGat<'a> = <C as Cursor>::DiffGat<'a>

§

type Storage = Vec<<C as Cursor>::Storage>

source§

impl<C: Cursor, F> Cursor for BatchCursorFilter<C, F>
where F: FnMut(C::Key<'_>, C::Val<'_>) -> bool + 'static,

§

type Key<'a> = <C as Cursor>::Key<'a>

§

type Val<'a> = <C as Cursor>::Val<'a>

§

type Time = <C as Cursor>::Time

§

type TimeGat<'a> = <C as Cursor>::TimeGat<'a>

§

type Diff = <C as Cursor>::Diff

§

type DiffGat<'a> = <C as Cursor>::DiffGat<'a>

§

type Storage = BatchFilter<<C as Cursor>::Storage, F>

source§

impl<C: Cursor, F> Cursor for BatchCursorFreeze<C, F>
where F: Fn(C::TimeGat<'_>) -> Option<C::Time>,

§

type Key<'a> = <C as Cursor>::Key<'a>

§

type Val<'a> = <C as Cursor>::Val<'a>

§

type Time = <C as Cursor>::Time

§

type TimeGat<'a> = <C as Cursor>::TimeGat<'a>

§

type Diff = <C as Cursor>::Diff

§

type DiffGat<'a> = <C as Cursor>::DiffGat<'a>

§

type Storage = BatchFreeze<<C as Cursor>::Storage, F>

source§

impl<TInner, C: Cursor> Cursor for differential_dataflow::trace::wrappers::enter::BatchCursorEnter<C, TInner>
where TInner: Refines<C::Time> + Lattice,

§

type Key<'a> = <C as Cursor>::Key<'a>

§

type Val<'a> = <C as Cursor>::Val<'a>

§

type Time = TInner

§

type TimeGat<'a> = &'a TInner

§

type Diff = <C as Cursor>::Diff

§

type DiffGat<'a> = <C as Cursor>::DiffGat<'a>

§

type Storage = BatchEnter<<C as Cursor>::Storage, TInner>

source§

impl<TInner, C: Cursor, F> Cursor for differential_dataflow::trace::wrappers::enter_at::BatchCursorEnter<C, TInner, F>
where TInner: Refines<C::Time> + Lattice, F: FnMut(C::Key<'_>, C::Val<'_>, C::TimeGat<'_>) -> TInner,

§

type Key<'a> = <C as Cursor>::Key<'a>

§

type Val<'a> = <C as Cursor>::Val<'a>

§

type Time = TInner

§

type TimeGat<'a> = &'a TInner

§

type Diff = <C as Cursor>::Diff

§

type DiffGat<'a> = <C as Cursor>::DiffGat<'a>

§

type Storage = BatchEnter<<C as Cursor>::Storage, TInner, F>