[][src]Trait differential_dataflow::trace::cursor::Cursor

pub trait Cursor<K, V, T, R> {
    type Storage;
    fn key_valid(&self, storage: &Self::Storage) -> bool;
fn val_valid(&self, storage: &Self::Storage) -> bool;
fn key<'a>(&self, storage: &'a Self::Storage) -> &'a K;
fn val<'a>(&self, storage: &'a Self::Storage) -> &'a V;
fn map_times<L: FnMut(&T, &R)>(&mut self, storage: &Self::Storage, logic: L);
fn step_key(&mut self, storage: &Self::Storage);
fn seek_key(&mut self, storage: &Self::Storage, key: &K);
fn step_val(&mut self, storage: &Self::Storage);
fn seek_val(&mut self, storage: &Self::Storage, val: &V);
fn rewind_keys(&mut self, storage: &Self::Storage);
fn rewind_vals(&mut self, storage: &Self::Storage); fn get_key<'a>(&self, storage: &'a Self::Storage) -> Option<&'a K> { ... }
fn get_val<'a>(&self, storage: &'a Self::Storage) -> Option<&'a V> { ... } }

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

Associated Types

type Storage

Type the cursor addresses data in.

Loading content...

Required methods

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.

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.

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

A reference to the current key. Asserts if invalid.

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

A reference to the current value. Asserts if invalid.

fn map_times<L: FnMut(&T, &R)>(&mut self, storage: &Self::Storage, logic: L)

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

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

Advances the cursor to the next key.

fn seek_key(&mut self, storage: &Self::Storage, key: &K)

Advances the cursor to the specified key.

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

Advances the cursor to the next value.

fn seek_val(&mut self, storage: &Self::Storage, val: &V)

Advances the cursor to the specified value.

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

Rewinds the cursor to the first key.

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

Rewinds the cursor to the first value for current key.

Loading content...

Provided methods

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

Returns a reference to the current key, if valid.

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

Returns a reference to the current value, if valid.

Loading content...

Implementors

impl<K, T, R, O> Cursor<K, (), T, R> for OrdKeyCursor<T, R, O> where
    K: Ord + Clone,
    T: Lattice + Ord + Clone,
    R: Semigroup,
    O: OrdOffset,
    <O as TryFrom<usize>>::Error: Debug,
    <O as TryInto<usize>>::Error: Debug
[src]

type Storage = OrdKeyBatch<K, T, R, O>

impl<K, V, T, R, B: BatchReader<K, V, T, R> + Abomonation> Cursor<K, V, T, R> for AbomonatedBatchCursor<K, V, T, R, B>[src]

type Storage = Abomonated<B, Vec<u8>>

impl<K, V, T, R, B: BatchReader<K, V, T, R>> Cursor<K, V, T, R> for RcBatchCursor<K, V, T, R, B>[src]

type Storage = Rc<B>

impl<K, V, T, R, B: BatchReader<K, V, T, R>> Cursor<K, V, T, R> for BatchCursorFrontier<K, V, T, R, B> where
    T: Timestamp + Lattice
[src]

type Storage = BatchFrontier<K, V, T, R, B>

impl<K, V, T, R, B: BatchReader<K, V, T, R>, F> Cursor<K, V, T, R> for BatchCursorFilter<K, V, T, R, B, F> where
    T: Timestamp,
    F: FnMut(&K, &V) -> bool + 'static, 
[src]

type Storage = BatchFilter<K, V, T, R, B, F>

impl<K, V, T, R, B: BatchReader<K, V, T, R>, F> Cursor<K, V, T, R> for BatchCursorFreeze<K, V, T, R, B, F> where
    F: Fn(&T) -> Option<T>, 
[src]

type Storage = BatchFreeze<K, V, T, R, B, F>

impl<K, V, T, R, C> Cursor<K, V, T, R> for CursorFrontier<K, V, T, R, C> where
    C: Cursor<K, V, T, R>,
    T: Timestamp + Lattice
[src]

type Storage = C::Storage

impl<K, V, T, R, C, F> Cursor<K, V, T, R> for CursorFilter<K, V, T, R, C, F> where
    C: Cursor<K, V, T, R>,
    T: Timestamp,
    F: FnMut(&K, &V) -> bool + 'static, 
[src]

type Storage = C::Storage

impl<K, V, T, R, C, F> Cursor<K, V, T, R> for CursorFreeze<K, V, T, R, C, F> where
    C: Cursor<K, V, T, R>,
    F: Fn(&T) -> Option<T>, 
[src]

type Storage = C::Storage

impl<K, V, T, R, C, TInner> Cursor<K, V, TInner, R> for differential_dataflow::trace::wrappers::enter::CursorEnter<K, V, T, R, C, TInner> where
    C: Cursor<K, V, T, R>,
    T: Timestamp,
    TInner: Refines<T> + Lattice
[src]

type Storage = C::Storage

impl<K, V, T, R, C, TInner, F> Cursor<K, V, TInner, R> for differential_dataflow::trace::wrappers::enter_at::CursorEnter<K, V, T, R, C, TInner, F> where
    C: Cursor<K, V, T, R>,
    T: Timestamp,
    TInner: Refines<T> + Lattice,
    F: FnMut(&K, &V, &T) -> TInner, 
[src]

type Storage = C::Storage

impl<K, V, T, R, C1, C2> Cursor<K, V, T, R> for CursorPair<C1, C2> where
    K: Ord,
    V: Ord,
    C1: Cursor<K, V, T, R>,
    C2: Cursor<K, V, T, R>, 
[src]

type Storage = (C1::Storage, C2::Storage)

impl<K, V, T, R, C: Cursor<K, V, T, R>> Cursor<K, V, T, R> for CursorList<K, V, T, R, C> where
    K: Ord,
    V: Ord
[src]

type Storage = Vec<C::Storage>

impl<K, V, T, R, O> Cursor<K, V, T, R> for OrdValCursor<V, T, R, O> where
    K: Ord + Clone,
    V: Ord + Clone,
    T: Lattice + Ord + Clone,
    R: Semigroup,
    O: OrdOffset,
    <O as TryFrom<usize>>::Error: Debug,
    <O as TryInto<usize>>::Error: Debug
[src]

type Storage = OrdValBatch<K, V, T, R, O>

impl<K, V, T, R, TInner, B: BatchReader<K, V, T, R>> Cursor<K, V, TInner, R> for differential_dataflow::trace::wrappers::enter::BatchCursorEnter<K, V, T, R, B, TInner> where
    T: Timestamp,
    TInner: Refines<T> + Lattice
[src]

type Storage = BatchEnter<K, V, T, R, B, TInner>

impl<K, V, T, R, TInner, B: BatchReader<K, V, T, R>, F> Cursor<K, V, TInner, R> for differential_dataflow::trace::wrappers::enter_at::BatchCursorEnter<K, V, T, R, B, TInner, F> where
    T: Timestamp,
    TInner: Refines<T> + Lattice,
    F: FnMut(&K, &V, &T) -> TInner, 
[src]

type Storage = BatchEnter<K, V, T, R, B, TInner, F>

Loading content...