Trait differential_dataflow::trace::layers::Cursor
source · pub trait Cursor<Storage> {
type Key;
// Required methods
fn key<'a>(&self, storage: &'a Storage) -> &'a Self::Key;
fn step(&mut self, storage: &Storage);
fn seek(&mut self, storage: &Storage, key: &Self::Key);
fn valid(&self, storage: &Storage) -> bool;
fn rewind(&mut self, storage: &Storage);
fn reposition(&mut self, storage: &Storage, lower: usize, upper: usize);
}
Expand description
A type supporting navigation.
The precise meaning of this navigation is not defined by the trait. It is likely that having
navigated around, the cursor will be different in some other way, but the Cursor
trait does
not explain how this is so.
Required Associated Types§
Required Methods§
sourcefn key<'a>(&self, storage: &'a Storage) -> &'a Self::Key
fn key<'a>(&self, storage: &'a Storage) -> &'a Self::Key
Reveals the current key.
sourcefn seek(&mut self, storage: &Storage, key: &Self::Key)
fn seek(&mut self, storage: &Storage, key: &Self::Key)
Advances the cursor until the location where key
would be expected.
sourcefn valid(&self, storage: &Storage) -> bool
fn valid(&self, storage: &Storage) -> bool
Returns true
if the cursor points at valid data. Returns false
if the cursor is exhausted.
sourcefn reposition(&mut self, storage: &Storage, lower: usize, upper: usize)
fn reposition(&mut self, storage: &Storage, lower: usize, upper: usize)
Repositions the cursor to a different range of values.