Struct differential_dataflow::trace::cursor::cursor_list::CursorList
[−]
[src]
pub struct CursorList<K, V, T, R, C: Cursor<K, V, T, R>> { /* fields omitted */ }
Provides a cursor interface over a list of cursors.
The CursorList keeps its cursor ordered by key, and cursors with the smallest key are then ordered by val.
At any point, the current elements (keys, vals) are determined by the number of leading equivalent keys and
equivalent values in self.cursors. Although they are implicit in self.cursors, We maintain these values
explicitly, in self.equiv_keys and self.equiv_vals. We also track the number of valid keys and valid
values, to avoid continually re-considering cursors in invalid states.
Methods
impl<K, V, T, R, C: Cursor<K, V, T, R>> CursorList<K, V, T, R, C> where
K: Ord,
V: Ord, [src]
K: Ord,
V: Ord,
fn new(cursors: Vec<C>, storage: &Vec<C::Storage>) -> Self[src]
Creates a new cursor list from pre-existing cursors.
Trait Implementations
impl<K: Debug, V: Debug, T: Debug, R: Debug, C: Debug + Cursor<K, V, T, R>> Debug for CursorList<K, V, T, R, C>[src]
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]
K: Ord,
V: Ord,
type Storage = Vec<C::Storage>
Type the cursor addresses data in.
fn key_valid(&self, _storage: &Self::Storage) -> bool[src]
Indicates if the current key is valid. Read more
fn val_valid(&self, _storage: &Self::Storage) -> bool[src]
Indicates if the current value is valid. Read more
fn key<'a>(&self, storage: &'a Self::Storage) -> &'a K[src]
A reference to the current key. Asserts if invalid.
fn val<'a>(&self, storage: &'a Self::Storage) -> &'a V[src]
A reference to the current value. Asserts if invalid.
fn map_times<L: FnMut(&T, R)>(&mut self, storage: &Self::Storage, logic: L)[src]
Applies logic to each pair of time and difference. Intended for mutation of the closure's scope. Read more
fn step_key(&mut self, storage: &Self::Storage)[src]
Advances the cursor to the next key. Indicates if the key is valid.
fn seek_key(&mut self, storage: &Self::Storage, key: &K)[src]
Advances the cursor to the specified key. Indicates if the key is valid.
fn step_val(&mut self, storage: &Self::Storage)[src]
Advances the cursor to the next value. Indicates if the value is valid.
fn seek_val(&mut self, storage: &Self::Storage, val: &V)[src]
Advances the cursor to the specified value. Indicates if the value is valid.
fn rewind_keys(&mut self, storage: &Self::Storage)[src]
Rewinds the cursor to the first key.
fn rewind_vals(&mut self, storage: &Self::Storage)[src]
Rewinds the cursor to the first value for current key.