pub struct OrdValCursor<L: Layout>where
    <L::Target as Update>::Key: Sized + Clone,
    <L::Target as Update>::Val: Sized + Clone,{ /* private fields */ }
Expand description

A cursor for navigating a single layer.

Trait Implementations§

source§

impl<L: Layout> Cursor for OrdValCursor<L>where <L::Target as Update>::Key: Sized + Clone, <L::Target as Update>::Val: Sized + Clone,

§

type Key = <<L as Layout>::Target as Update>::Key

Key by which updates are indexed.
§

type Val = <<L as Layout>::Target as Update>::Val

Values associated with keys.
§

type Time = <<L as Layout>::Target as Update>::Time

Timestamps associated with updates
§

type Diff = <<L as Layout>::Target as Update>::Diff

Associated update.
§

type Storage = OrdValBatch<L>

Storage required by the cursor.
source§

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

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

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

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

fn map_times<L2: FnMut(&Self::Time, &Self::Diff)>( &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 get_key<'a>(&self, storage: &'a Self::Storage) -> Option<&'a Self::Key>

Returns a reference to the current key, if valid.
source§

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

Returns a reference to the current value, if valid.

Auto Trait Implementations§

§

impl<L> RefUnwindSafe for OrdValCursor<L>where L: RefUnwindSafe, <L as Layout>::ValContainer: BatchContainer<Item = <<L as Layout>::Target as Update>::Val>,

§

impl<L> Send for OrdValCursor<L>where L: Send, <L as Layout>::ValContainer: BatchContainer<Item = <<L as Layout>::Target as Update>::Val>,

§

impl<L> Sync for OrdValCursor<L>where L: Sync, <L as Layout>::ValContainer: BatchContainer<Item = <<L as Layout>::Target as Update>::Val>,

§

impl<L> Unpin for OrdValCursor<L>where L: Unpin, <L as Layout>::ValContainer: BatchContainer<Item = <<L as Layout>::Target as Update>::Val>,

§

impl<L> UnwindSafe for OrdValCursor<L>where L: UnwindSafe, <L as Layout>::ValContainer: BatchContainer<Item = <<L as Layout>::Target as Update>::Val>,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.