OrdValCursor

Struct OrdValCursor 

Source
pub struct OrdValCursor<L: Layout> { /* private fields */ }
Expand description

A cursor for navigating a single layer.

Trait Implementations§

Source§

impl<L: Layout> Cursor for OrdValCursor<L>

Source§

type Storage = OrdValBatch<L>

Storage required by the cursor.
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 key<'a>(&self, storage: &'a OrdValBatch<L>) -> Self::Key<'a>

A reference to the current key. Asserts if invalid.
Source§

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

A reference to the current value. Asserts if invalid.
Source§

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

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

fn key_valid(&self, storage: &OrdValBatch<L>) -> bool

Indicates if the current key is valid. Read more
Source§

fn val_valid(&self, storage: &OrdValBatch<L>) -> bool

Indicates if the current value is valid. Read more
Source§

fn step_key(&mut self, storage: &OrdValBatch<L>)

Advances the cursor to the next key.
Source§

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

Advances the cursor to the specified key.
Source§

fn step_val(&mut self, storage: &OrdValBatch<L>)

Advances the cursor to the next value.
Source§

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

Advances the cursor to the specified value.
Source§

fn rewind_keys(&mut self, storage: &OrdValBatch<L>)

Rewinds the cursor to the first key.
Source§

fn rewind_vals(&mut self, storage: &OrdValBatch<L>)

Rewinds the cursor to the first value for current key.
Source§

fn to_vec<K, IK, V, IV>( &mut self, storage: &Self::Storage, into_key: IK, into_val: IV, ) -> Vec<((K, V), Vec<(Self::Time, Self::Diff)>)>
where IK: for<'a> Fn(Self::Key<'a>) -> K, IV: for<'a> Fn(Self::Val<'a>) -> V,

Rewinds the cursor and outputs its contents to a Vec
Source§

impl<L: Layout> WithLayout for OrdValCursor<L>

Source§

type Layout = L

The layout.

Auto Trait Implementations§

§

impl<L> Freeze for OrdValCursor<L>

§

impl<L> RefUnwindSafe for OrdValCursor<L>
where L: RefUnwindSafe,

§

impl<L> Send for OrdValCursor<L>
where L: Send,

§

impl<L> Sync for OrdValCursor<L>
where L: Sync,

§

impl<L> Unpin for OrdValCursor<L>
where L: Unpin,

§

impl<L> UnwindSafe for OrdValCursor<L>
where L: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<L> LayoutExt for L
where L: WithLayout,

Source§

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>

Alias for an borrowed key of a layout.
Source§

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>

Alias for an borrowed val of a layout.
Source§

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>

Alias for an borrowed time of a layout.
Source§

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>

Alias for an borrowed diff of a layout.
Source§

type KeyContainer = <<L as WithLayout>::Layout as Layout>::KeyContainer

Container for update keys.
Source§

type ValContainer = <<L as WithLayout>::Layout as Layout>::ValContainer

Container for update vals.
Source§

type TimeContainer = <<L as WithLayout>::Layout as Layout>::TimeContainer

Container for times.
Source§

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

Construct an owned key from a reference.
Source§

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

Construct an owned time from a reference.
Source§

fn owned_diff(diff: <L as LayoutExt>::DiffGat<'_>) -> <L as LayoutExt>::Diff

Construct an owned diff from a reference.
Source§

fn clone_time_onto( time: <L as LayoutExt>::TimeGat<'_>, onto: &mut <L as LayoutExt>::Time, )

Clones a reference time onto an owned time.
Source§

impl<'a, S, T> Semigroup<&'a S> for T
where T: Semigroup<S>,

Source§

fn plus_equals(&mut self, rhs: &&'a S)

The method of std::ops::AddAssign, for types that do not implement AddAssign.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.