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>
impl<'a, U: Update> UpdatesView<'a, U>
Sourcepub fn iter(
self,
) -> impl Iterator<Item = (Ref<'a, U::Key>, Ref<'a, U::Val>, Ref<'a, U::Time>, Ref<'a, U::Diff>)>
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.
Trait Implementations§
Source§impl<'a, U: Update> Clone for UpdatesView<'a, U>
impl<'a, U: Update> Clone for UpdatesView<'a, U>
impl<'a, U: Update> Copy for UpdatesView<'a, U>
Auto Trait Implementations§
impl<'a, U> Freeze for UpdatesView<'a, U>where
<<<U as ColumnarUpdate>::Key as Columnar>::Container as Borrow>::Borrowed<'a>: Freeze,
<<<U as ColumnarUpdate>::Val as Columnar>::Container as Borrow>::Borrowed<'a>: Freeze,
<<<U as ColumnarUpdate>::Time as Columnar>::Container as Borrow>::Borrowed<'a>: Freeze,
<<<U as ColumnarUpdate>::Diff as Columnar>::Container as Borrow>::Borrowed<'a>: Freeze,
impl<'a, U> RefUnwindSafe for UpdatesView<'a, U>where
<<<U as ColumnarUpdate>::Key as Columnar>::Container as Borrow>::Borrowed<'a>: RefUnwindSafe,
<<<U as ColumnarUpdate>::Val as Columnar>::Container as Borrow>::Borrowed<'a>: RefUnwindSafe,
<<<U as ColumnarUpdate>::Time as Columnar>::Container as Borrow>::Borrowed<'a>: RefUnwindSafe,
<<<U as ColumnarUpdate>::Diff as Columnar>::Container as Borrow>::Borrowed<'a>: RefUnwindSafe,
impl<'a, U> Send for UpdatesView<'a, U>where
<<<U as ColumnarUpdate>::Key as Columnar>::Container as Borrow>::Borrowed<'a>: Send,
<<<U as ColumnarUpdate>::Val as Columnar>::Container as Borrow>::Borrowed<'a>: Send,
<<<U as ColumnarUpdate>::Time as Columnar>::Container as Borrow>::Borrowed<'a>: Send,
<<<U as ColumnarUpdate>::Diff as Columnar>::Container as Borrow>::Borrowed<'a>: Send,
impl<'a, U> Sync for UpdatesView<'a, U>where
<<<U as ColumnarUpdate>::Key as Columnar>::Container as Borrow>::Borrowed<'a>: Sync,
<<<U as ColumnarUpdate>::Val as Columnar>::Container as Borrow>::Borrowed<'a>: Sync,
<<<U as ColumnarUpdate>::Time as Columnar>::Container as Borrow>::Borrowed<'a>: Sync,
<<<U as ColumnarUpdate>::Diff as Columnar>::Container as Borrow>::Borrowed<'a>: Sync,
impl<'a, U> Unpin for UpdatesView<'a, U>where
<<<U as ColumnarUpdate>::Key as Columnar>::Container as Borrow>::Borrowed<'a>: Unpin,
<<<U as ColumnarUpdate>::Val as Columnar>::Container as Borrow>::Borrowed<'a>: Unpin,
<<<U as ColumnarUpdate>::Time as Columnar>::Container as Borrow>::Borrowed<'a>: Unpin,
<<<U as ColumnarUpdate>::Diff as Columnar>::Container as Borrow>::Borrowed<'a>: Unpin,
impl<'a, U> UnsafeUnpin for UpdatesView<'a, U>where
<<<U as ColumnarUpdate>::Key as Columnar>::Container as Borrow>::Borrowed<'a>: UnsafeUnpin,
<<<U as ColumnarUpdate>::Val as Columnar>::Container as Borrow>::Borrowed<'a>: UnsafeUnpin,
<<<U as ColumnarUpdate>::Time as Columnar>::Container as Borrow>::Borrowed<'a>: UnsafeUnpin,
<<<U as ColumnarUpdate>::Diff as Columnar>::Container as Borrow>::Borrowed<'a>: UnsafeUnpin,
impl<'a, U> UnwindSafe for UpdatesView<'a, U>where
<<<U as ColumnarUpdate>::Key as Columnar>::Container as Borrow>::Borrowed<'a>: UnwindSafe,
<<<U as ColumnarUpdate>::Val as Columnar>::Container as Borrow>::Borrowed<'a>: UnwindSafe,
<<<U as ColumnarUpdate>::Time as Columnar>::Container as Borrow>::Borrowed<'a>: UnwindSafe,
<<<U as ColumnarUpdate>::Diff as Columnar>::Container as Borrow>::Borrowed<'a>: 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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<'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.