pub struct SnapshotScanState { /* private fields */ }Expand description
State machine for descending-commit_ts prefix scans under a snapshot.
For each logical quad (shared term prefix), the first version with
commit_ts <= snapshot is the visible candidate; later (older) versions
of the same quad are skipped.
Implementations§
Source§impl SnapshotScanState
impl SnapshotScanState
Sourcepub fn consider_slice(
&mut self,
logical_key: &[u8],
commit_ts: CommitTs,
snapshot_ts: u64,
) -> bool
pub fn consider_slice( &mut self, logical_key: &[u8], commit_ts: CommitTs, snapshot_ts: u64, ) -> bool
Returns true when commit_ts is the newest version visible at snapshot.
The candidate’s logical key is copied into the state’s own reusable
buffer (clear() + extend_from_slice), so a scan pays no per-row
allocation after the first handled version.
Trait Implementations§
Source§impl Debug for SnapshotScanState
impl Debug for SnapshotScanState
Source§impl Default for SnapshotScanState
impl Default for SnapshotScanState
Source§fn default() -> SnapshotScanState
fn default() -> SnapshotScanState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SnapshotScanState
impl RefUnwindSafe for SnapshotScanState
impl Send for SnapshotScanState
impl Sync for SnapshotScanState
impl Unpin for SnapshotScanState
impl UnsafeUnpin for SnapshotScanState
impl UnwindSafe for SnapshotScanState
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