pub struct UpdatesBuilder<U: Update> { /* private fields */ }Expand description
An incremental trie builder that accepts sorted, consolidated UpdatesTyped chunks
and melds them into a single UpdatesTyped trie.
The internal UpdatesTyped has open (unsealed) bounds at the keys, vals, and times
levels — the last group at each level has its values pushed but no corresponding
bounds entry. diffs.bounds is always 1:1 with times.values.
meld accepts a consolidated UpdatesTyped whose first (key, val, time) is
strictly greater than the builder’s last (key, val, time). The key and val
may equal the builder’s current open key/val, as long as the time is greater.
done seals all open bounds and returns the completed UpdatesTyped.
Implementations§
Source§impl<U: Update> UpdatesBuilder<U>
impl<U: Update> UpdatesBuilder<U>
Sourcepub fn new_from(updates: UpdatesTyped<U>) -> Self
pub fn new_from(updates: UpdatesTyped<U>) -> Self
Construct a new builder from consolidated, sealed updates.
Unseals the last group at keys, vals, and times levels so that
subsequent meld calls can extend the open groups.
If the updates are not consolidated none of this works.
Sourcepub fn meld(&mut self, chunk: &UpdatesTyped<U>)
pub fn meld(&mut self, chunk: &UpdatesTyped<U>)
Meld a sorted, consolidated UpdatesTyped chunk into this builder.
The chunk’s first (key, val, time) must be strictly greater than
the builder’s last (key, val, time). Keys and vals may overlap
(continue the current group), but times must be strictly increasing
within the same (key, val).
Sourcepub fn done(self) -> UpdatesTyped<U>
pub fn done(self) -> UpdatesTyped<U>
Seal all open bounds and return the completed UpdatesTyped.
Auto Trait Implementations§
impl<U> Freeze for UpdatesBuilder<U>where
<<U as ColumnarUpdate>::Key as Columnar>::Container: Freeze,
<<U as ColumnarUpdate>::Val as Columnar>::Container: Freeze,
<<U as ColumnarUpdate>::Time as Columnar>::Container: Freeze,
<<U as ColumnarUpdate>::Diff as Columnar>::Container: Freeze,
impl<U> RefUnwindSafe for UpdatesBuilder<U>where
<<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> Send for UpdatesBuilder<U>
impl<U> Sync for UpdatesBuilder<U>where
<<U as ColumnarUpdate>::Key as Columnar>::Container: Sync,
<<U as ColumnarUpdate>::Val as Columnar>::Container: Sync,
<<U as ColumnarUpdate>::Time as Columnar>::Container: Sync,
<<U as ColumnarUpdate>::Diff as Columnar>::Container: Sync,
impl<U> Unpin for UpdatesBuilder<U>where
<<U as ColumnarUpdate>::Key as Columnar>::Container: Unpin,
<<U as ColumnarUpdate>::Val as Columnar>::Container: Unpin,
<<U as ColumnarUpdate>::Time as Columnar>::Container: Unpin,
<<U as ColumnarUpdate>::Diff as Columnar>::Container: Unpin,
impl<U> UnsafeUnpin for UpdatesBuilder<U>where
<<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> UnwindSafe for UpdatesBuilder<U>where
<<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
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>
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>
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)
std::ops::AddAssign, for types that do not implement AddAssign.