pub struct CursorList<C> { /* private fields */ }
Expand description
Provides a cursor interface over a list of cursors.
The CursorList
tracks the indices of cursors with the minimum key, and the the indices of cursors with
the minimum key and minimum value. It performs no clever management of these sets otherwise.
Implementations§
Trait Implementations§
Source§impl<C: Cursor> Cursor for CursorList<C>
impl<C: Cursor> Cursor for CursorList<C>
Source§fn key_valid(&self, _storage: &Vec<C::Storage>) -> bool
fn key_valid(&self, _storage: &Vec<C::Storage>) -> bool
Indicates if the current key is valid. Read more
Source§fn val_valid(&self, _storage: &Vec<C::Storage>) -> bool
fn val_valid(&self, _storage: &Vec<C::Storage>) -> bool
Indicates if the current value is valid. Read more
Source§fn key<'a>(&self, storage: &'a Vec<C::Storage>) -> Self::Key<'a>
fn key<'a>(&self, storage: &'a Vec<C::Storage>) -> Self::Key<'a>
A reference to the current key. Asserts if invalid.
Source§fn val<'a>(&self, storage: &'a Vec<C::Storage>) -> Self::Val<'a>
fn val<'a>(&self, storage: &'a Vec<C::Storage>) -> Self::Val<'a>
A reference to the current value. Asserts if invalid.
Source§fn get_key<'a>(&self, storage: &'a Vec<C::Storage>) -> Option<Self::Key<'a>>
fn get_key<'a>(&self, storage: &'a Vec<C::Storage>) -> Option<Self::Key<'a>>
Returns a reference to the current key, if valid.
Source§fn get_val<'a>(&self, storage: &'a Vec<C::Storage>) -> Option<Self::Val<'a>>
fn get_val<'a>(&self, storage: &'a Vec<C::Storage>) -> Option<Self::Val<'a>>
Returns a reference to the current value, if valid.
Source§fn map_times<L: FnMut(Self::TimeGat<'_>, Self::DiffGat<'_>)>(
&mut self,
storage: &Vec<C::Storage>,
logic: L,
)
fn map_times<L: FnMut(Self::TimeGat<'_>, Self::DiffGat<'_>)>( &mut self, storage: &Vec<C::Storage>, logic: L, )
Applies
logic
to each pair of time and difference. Intended for mutation of the
closure’s scope.Source§fn seek_key(&mut self, storage: &Vec<C::Storage>, key: Self::Key<'_>)
fn seek_key(&mut self, storage: &Vec<C::Storage>, key: Self::Key<'_>)
Advances the cursor to the specified key.
Source§fn seek_val(&mut self, storage: &Vec<C::Storage>, val: Self::Val<'_>)
fn seek_val(&mut self, storage: &Vec<C::Storage>, val: Self::Val<'_>)
Advances the cursor to the specified value.
Source§fn rewind_keys(&mut self, storage: &Vec<C::Storage>)
fn rewind_keys(&mut self, storage: &Vec<C::Storage>)
Rewinds the cursor to the first key.
Source§fn rewind_vals(&mut self, storage: &Vec<C::Storage>)
fn rewind_vals(&mut self, storage: &Vec<C::Storage>)
Rewinds the cursor to the first value for current key.
Source§impl<C: Debug> Debug for CursorList<C>
impl<C: Debug> Debug for CursorList<C>
Source§impl<C: Cursor> WithLayout for CursorList<C>
impl<C: Cursor> WithLayout for CursorList<C>
Source§type Layout = <C as WithLayout>::Layout
type Layout = <C as WithLayout>::Layout
The layout.
Auto Trait Implementations§
impl<C> Freeze for CursorList<C>
impl<C> RefUnwindSafe for CursorList<C>where
C: RefUnwindSafe,
impl<C> Send for CursorList<C>where
C: Send,
impl<C> Sync for CursorList<C>where
C: Sync,
impl<C> Unpin for CursorList<C>where
C: Unpin,
impl<C> UnwindSafe for CursorList<C>where
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<L> LayoutExt for Lwhere
L: WithLayout,
impl<L> LayoutExt for Lwhere
L: WithLayout,
Source§type KeyOwn = <<<L as WithLayout>::Layout as Layout>::KeyContainer as BatchContainer>::Owned
type KeyOwn = <<<L as WithLayout>::Layout as Layout>::KeyContainer as BatchContainer>::Owned
Alias for an owned key of a layout.
Source§type Key<'a> = <<<L as WithLayout>::Layout as Layout>::KeyContainer as BatchContainer>::ReadItem<'a>
type Key<'a> = <<<L as WithLayout>::Layout as Layout>::KeyContainer as BatchContainer>::ReadItem<'a>
Alias for an borrowed key of a layout.
Source§type ValOwn = <<<L as WithLayout>::Layout as Layout>::ValContainer as BatchContainer>::Owned
type ValOwn = <<<L as WithLayout>::Layout as Layout>::ValContainer as BatchContainer>::Owned
Alias for an owned val of a layout.
Source§type Val<'a> = <<<L as WithLayout>::Layout as Layout>::ValContainer as BatchContainer>::ReadItem<'a>
type Val<'a> = <<<L as WithLayout>::Layout as Layout>::ValContainer as BatchContainer>::ReadItem<'a>
Alias for an borrowed val of a layout.
Source§type Time = <<<L as WithLayout>::Layout as Layout>::TimeContainer as BatchContainer>::Owned
type Time = <<<L as WithLayout>::Layout as Layout>::TimeContainer as BatchContainer>::Owned
Alias for an owned time of a layout.
Source§type TimeGat<'a> = <<<L as WithLayout>::Layout as Layout>::TimeContainer as BatchContainer>::ReadItem<'a>
type TimeGat<'a> = <<<L as WithLayout>::Layout as Layout>::TimeContainer as BatchContainer>::ReadItem<'a>
Alias for an borrowed time of a layout.
Source§type Diff = <<<L as WithLayout>::Layout as Layout>::DiffContainer as BatchContainer>::Owned
type Diff = <<<L as WithLayout>::Layout as Layout>::DiffContainer as BatchContainer>::Owned
Alias for an owned diff of a layout.
Source§type DiffGat<'a> = <<<L as WithLayout>::Layout as Layout>::DiffContainer as BatchContainer>::ReadItem<'a>
type DiffGat<'a> = <<<L as WithLayout>::Layout as Layout>::DiffContainer as BatchContainer>::ReadItem<'a>
Alias for an borrowed diff of a layout.
Source§type KeyContainer = <<L as WithLayout>::Layout as Layout>::KeyContainer
type KeyContainer = <<L as WithLayout>::Layout as Layout>::KeyContainer
Container for update keys.
Source§type ValContainer = <<L as WithLayout>::Layout as Layout>::ValContainer
type ValContainer = <<L as WithLayout>::Layout as Layout>::ValContainer
Container for update vals.
Source§type TimeContainer = <<L as WithLayout>::Layout as Layout>::TimeContainer
type TimeContainer = <<L as WithLayout>::Layout as Layout>::TimeContainer
Container for times.
Source§type DiffContainer = <<L as WithLayout>::Layout as Layout>::DiffContainer
type DiffContainer = <<L as WithLayout>::Layout as Layout>::DiffContainer
Container for diffs.
Source§fn owned_key(key: <L as LayoutExt>::Key<'_>) -> <L as LayoutExt>::KeyOwn
fn owned_key(key: <L as LayoutExt>::Key<'_>) -> <L as LayoutExt>::KeyOwn
Construct an owned key from a reference.
Source§fn owned_val(val: <L as LayoutExt>::Val<'_>) -> <L as LayoutExt>::ValOwn
fn owned_val(val: <L as LayoutExt>::Val<'_>) -> <L as LayoutExt>::ValOwn
Construct an owned val from a reference.
Source§fn owned_time(time: <L as LayoutExt>::TimeGat<'_>) -> <L as LayoutExt>::Time
fn owned_time(time: <L as LayoutExt>::TimeGat<'_>) -> <L as LayoutExt>::Time
Construct an owned time from a reference.
Source§impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
Source§fn plus_equals(&mut self, rhs: &&'a S)
fn plus_equals(&mut self, rhs: &&'a S)
The method of
std::ops::AddAssign
, for types that do not implement AddAssign
.