pub struct MutableRun { /* private fields */ }Implementations§
Source§impl MutableRun
impl MutableRun
pub fn new() -> Self
Sourcepub fn insert_many(&mut self, rows: Vec<Row>)
pub fn insert_many(&mut self, rows: Vec<Row>)
Fold drained memtable rows (already ascending by (RowId, Epoch)) into
the tier via one bulk merge + re-spread — far cheaper than per-element
inserts, which would cluster at the tail on sorted input.
pub fn is_empty(&self) -> bool
Sourcepub fn approx_bytes(&self) -> u64
pub fn approx_bytes(&self) -> u64
Approximate bytes held — the spill-threshold signal.
Sourcepub fn get_version(
&self,
row_id: RowId,
snapshot_epoch: Epoch,
) -> Option<(Epoch, Row)>
pub fn get_version( &self, row_id: RowId, snapshot_epoch: Epoch, ) -> Option<(Epoch, Row)>
Newest version of row_id with epoch <= snapshot (including
tombstones). Legacy epoch-only entry point; prefer
Self::get_version_at when the caller holds a full Snapshot.
Sourcepub fn get_version_at(
&self,
row_id: RowId,
snapshot: Snapshot,
) -> Option<(Epoch, Row)>
pub fn get_version_at( &self, row_id: RowId, snapshot: Snapshot, ) -> Option<(Epoch, Row)>
Newest version of row_id visible under snapshot (including
tombstones), using HLC authority when stamps are present (P0.5-T3).
Seeks to row_id’s versions via the PMA’s gappy binary search.
Sourcepub fn visible_versions(&self, snapshot_epoch: Epoch) -> Vec<Row>
pub fn visible_versions(&self, snapshot_epoch: Epoch) -> Vec<Row>
Newest visible version per RowId at snapshot (including tombstones),
ascending by RowId. Legacy epoch-only entry point; prefer
Self::visible_versions_at.
Sourcepub fn visible_versions_at(&self, snapshot: Snapshot) -> Vec<Row>
pub fn visible_versions_at(&self, snapshot: Snapshot) -> Vec<Row>
Newest visible version per RowId under a full Snapshot, including
tombstones. HLC-stamped versions use HLC order (P0.5-T3).
Sourcepub fn newest_visible_iter<'a>(
&'a self,
snapshot: &Snapshot,
) -> MutableRunVisibleVersionCursor<'a> ⓘ
pub fn newest_visible_iter<'a>( &'a self, snapshot: &Snapshot, ) -> MutableRunVisibleVersionCursor<'a> ⓘ
Borrowing ordered iterator over the newest visible version of each
RowId under snapshot (including tombstones). Mirrors
Self::newest_visible_map but never clones the row bytes — the
yielded &Row borrows from the underlying Pmas for the cursor’s
lifetime. The cursor dedups to one entry per RowId (the newest
visible version), iterating them in ascending RowId order, exactly
like draining the Self::newest_visible_map BTreeMap.
Sourcepub fn drain_sorted(&mut self) -> Vec<Row>
pub fn drain_sorted(&mut self) -> Vec<Row>
Drain every version in ascending (RowId, Epoch) order — the order
RunWriter::write requires when spilling to an immutable run.
Trait Implementations§
Source§impl Clone for MutableRun
impl Clone for MutableRun
Source§fn clone(&self) -> MutableRun
fn clone(&self) -> MutableRun
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for MutableRun
impl RefUnwindSafe for MutableRun
impl Send for MutableRun
impl Sync for MutableRun
impl Unpin for MutableRun
impl UnsafeUnpin for MutableRun
impl UnwindSafe for MutableRun
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> 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>
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 more