pub struct Updates<U: Update, B = Bytes> {
pub keys: Stash<Lists<ContainerOf<U::Key>>, B>,
pub vals: Stash<Lists<ContainerOf<U::Val>>, B>,
pub times: Stash<Lists<ContainerOf<U::Time>>, B>,
pub diffs: Stash<Lists<ContainerOf<U::Diff>>, B>,
}Expand description
Stash-backed update storage: each column may be typed (writable) or
borrowed from wire bytes (read-only, zero-copy).
Construction sites work in UpdatesTyped; convert via From at the
boundary. Reader code uses UpdatesView via Updates::view, which
produces the same shape regardless of whether the columns are typed or
borrowed.
Fields§
§keys: Stash<Lists<ContainerOf<U::Key>>, B>Outer key list (one entry per group of keys at the trie root).
vals: Stash<Lists<ContainerOf<U::Val>>, B>Per-key list of vals.
times: Stash<Lists<ContainerOf<U::Time>>, B>Per-val list of times.
diffs: Stash<Lists<ContainerOf<U::Diff>>, B>Per-time list of diffs.
Implementations§
Source§impl<U: Update, B: Deref<Target = [u8]> + Clone + 'static> Updates<U, B>
impl<U: Update, B: Deref<Target = [u8]> + Clone + 'static> Updates<U, B>
Sourcepub fn view(&self) -> UpdatesView<'_, U>
pub fn view(&self) -> UpdatesView<'_, U>
Borrow the four columns as a single UpdatesView.
Sourcepub fn into_typed(self) -> UpdatesTyped<U>
pub fn into_typed(self) -> UpdatesTyped<U>
Convert to fully owned form, copying any Stash::Bytes columns into
typed Lists. Already-typed columns pass through with no copy.
This method should be avoided unless typed containers are truly needed.
Trait Implementations§
Source§impl<U: Update, B> From<UpdatesTyped<U>> for Updates<U, B>
impl<U: Update, B> From<UpdatesTyped<U>> for Updates<U, B>
Source§fn from(owned: UpdatesTyped<U>) -> Self
fn from(owned: UpdatesTyped<U>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<U, B> Freeze for Updates<U, B>
impl<U, B> RefUnwindSafe for Updates<U, B>where
B: RefUnwindSafe,
<<U as ColumnarUpdate>::Key as Columnar>::Container: RefUnwindSafe,
<<U as ColumnarUpdate>::Val as Columnar>::Container: RefUnwindSafe,
<<U as ColumnarUpdate>::Time as Columnar>::Container: RefUnwindSafe,
<<U as ColumnarUpdate>::Diff as Columnar>::Container: RefUnwindSafe,
impl<U, B> Send for Updates<U, B>where
B: Send,
impl<U, B> Sync for Updates<U, B>
impl<U, B> Unpin for Updates<U, B>
impl<U, B> UnsafeUnpin for Updates<U, B>where
B: UnsafeUnpin,
<<U as ColumnarUpdate>::Key as Columnar>::Container: UnsafeUnpin,
<<U as ColumnarUpdate>::Val as Columnar>::Container: UnsafeUnpin,
<<U as ColumnarUpdate>::Time as Columnar>::Container: UnsafeUnpin,
<<U as ColumnarUpdate>::Diff as Columnar>::Container: UnsafeUnpin,
impl<U, B> UnwindSafe for Updates<U, B>where
B: UnwindSafe,
<<U as ColumnarUpdate>::Key as Columnar>::Container: UnwindSafe,
<<U as ColumnarUpdate>::Val as Columnar>::Container: UnwindSafe,
<<U as ColumnarUpdate>::Time as Columnar>::Container: UnwindSafe,
<<U as ColumnarUpdate>::Diff as Columnar>::Container: 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.