Skip to main content

UpdatesView

Struct UpdatesView 

Source
pub struct UpdatesView<'a, U: Update> {
    pub keys: <Lists<ContainerOf<U::Key>> as Borrow>::Borrowed<'a>,
    pub vals: <Lists<ContainerOf<U::Val>> as Borrow>::Borrowed<'a>,
    pub times: <Lists<ContainerOf<U::Time>> as Borrow>::Borrowed<'a>,
    pub diffs: <Lists<ContainerOf<U::Diff>> as Borrow>::Borrowed<'a>,
}
Expand description

Borrowed view of an UpdatesTyped<U> with the same four-field shape.

Reader code should consume an UpdatesTyped through this view rather than reading fields directly. This decouples readers from the storage representation: the view’s shape stays the same whether the underlying UpdatesTyped holds owned Lists or (later) Stash-backed columns that may be borrowed from wire bytes.

Fields§

§keys: <Lists<ContainerOf<U::Key>> as Borrow>::Borrowed<'a>

Outer key list (one entry per group of keys at the trie root).

§vals: <Lists<ContainerOf<U::Val>> as Borrow>::Borrowed<'a>

Per-key list of vals.

§times: <Lists<ContainerOf<U::Time>> as Borrow>::Borrowed<'a>

Per-val list of times.

§diffs: <Lists<ContainerOf<U::Diff>> as Borrow>::Borrowed<'a>

Per-time list of diffs.

Implementations§

Source§

impl<'a, U: Update> UpdatesView<'a, U>

Source

pub fn iter( self, ) -> impl Iterator<Item = (Ref<'a, U::Key>, Ref<'a, U::Val>, Ref<'a, U::Time>, Ref<'a, U::Diff>)>

Iterate all (key, val, time, diff) entries as refs.

Source

pub fn vals_bounds(self, key_range: Range<usize>) -> Range<usize>

Translate a key-range into the corresponding val-range via vals.bounds.

Source

pub fn times_bounds(self, val_range: Range<usize>) -> Range<usize>

Translate a val-range into the corresponding time-range via times.bounds.

Trait Implementations§

Source§

impl<'a, U: Update> Clone for UpdatesView<'a, U>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a, U: Update> Copy for UpdatesView<'a, U>

Auto Trait Implementations§

§

impl<'a, U> Freeze for UpdatesView<'a, U>

§

impl<'a, U> RefUnwindSafe for UpdatesView<'a, U>

§

impl<'a, U> Send for UpdatesView<'a, U>

§

impl<'a, U> Sync for UpdatesView<'a, U>

§

impl<'a, U> Unpin for UpdatesView<'a, U>

§

impl<'a, U> UnsafeUnpin for UpdatesView<'a, U>

§

impl<'a, U> UnwindSafe for UpdatesView<'a, U>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> CopyAs<T> for T
where T: Copy,

Source§

fn copy_as(self) -> T

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<'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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.