pub struct MemoryRecordSnapshot { /* private fields */ }Expand description
One pinned committed sequence. Dropping the last owner releases its lease.
Implementations§
Source§impl MemoryRecordSnapshot
impl MemoryRecordSnapshot
pub fn sequence(&self) -> CommitSequence
Sourcepub fn get(&self, key: &[u8]) -> Option<RecordVersion<SharedRecordValue>>
pub fn get(&self, key: &[u8]) -> Option<RecordVersion<SharedRecordValue>>
Return a revision even if its payload is a tombstone.
Sourcepub fn scan(
&self,
prefix: &[u8],
after: Option<&[u8]>,
limit: usize,
control: &StorageReadControl,
) -> VersionResult<BudgetedVec<ScannedRecord>>
pub fn scan( &self, prefix: &[u8], after: Option<&[u8]>, limit: usize, control: &StorageReadControl, ) -> VersionResult<BudgetedVec<ScannedRecord>>
Read a bounded ordered page, including tombstones for revision checks.
Trait Implementations§
Source§impl CommittedRecordSnapshot for MemoryRecordSnapshot
impl CommittedRecordSnapshot for MemoryRecordSnapshot
Source§fn reclamation_epoch(&self) -> Option<u64>
fn reclamation_epoch(&self) -> Option<u64>
The provider’s tombstone-reclamation epoch captured under the same admission as this snapshot.
None means this provider does not supply reclamation-aware observations. Wrappers must forward the original value, never refresh it from current storage.fn sequence(&self) -> CommitSequence
Source§fn get(
&self,
key: &[u8],
control: &StorageReadControl,
) -> VersionResult<Option<RecordVersion<SharedRecordValue>>>
fn get( &self, key: &[u8], control: &StorageReadControl, ) -> VersionResult<Option<RecordVersion<SharedRecordValue>>>
Return the newest revision at or before this snapshot, including tombstones. Missing identities return
None.Source§fn visit_value_bounded(
&self,
key: &[u8],
max_bytes: usize,
control: &StorageReadControl,
visit: &mut RecordValueVisitor<'_>,
) -> VersionResult<()>
fn visit_value_bounded( &self, key: &[u8], max_bytes: usize, control: &StorageReadControl, visit: &mut RecordValueVisitor<'_>, ) -> VersionResult<()>
Check a live value’s encoded size before provider materialization, without changing revision or tombstone visibility. The default rejects unsupported providers rather than materializing through
get.Source§fn scan(
&self,
prefix: &[u8],
after: Option<&[u8]>,
limit: usize,
control: &StorageReadControl,
) -> VersionResult<BudgetedVec<ScannedRecord>>
fn scan( &self, prefix: &[u8], after: Option<&[u8]>, limit: usize, control: &StorageReadControl, ) -> VersionResult<BudgetedVec<ScannedRecord>>
Return at most
limit unique keys in ascending order, strictly after after, including tombstones. A short page means that the prefix is exhausted at this snapshot; all pages keep the same boundary.Source§fn visit_prefix(
&self,
prefix: &[u8],
after: Option<&[u8]>,
limit: usize,
control: &StorageReadControl,
visit: &mut RecordScanVisitor<'_>,
) -> VersionResult<()>
fn visit_prefix( &self, prefix: &[u8], after: Option<&[u8]>, limit: usize, control: &StorageReadControl, visit: &mut RecordScanVisitor<'_>, ) -> VersionResult<()>
Visit ordered versions until the limit, exhaustion or a visitor returning
false. Implementations with borrowed pages avoid charging their encoded payloads to the caller’s decode allowance.Source§fn metadata(
&self,
key: &[u8],
control: &StorageReadControl,
) -> VersionResult<Option<RecordMetadata>>
fn metadata( &self, key: &[u8], control: &StorageReadControl, ) -> VersionResult<Option<RecordMetadata>>
Read a revision and tombstone marker without materializing its value when the provider supports key-only access.
Source§fn visit_keys(
&self,
prefix: &[u8],
after: Option<&[u8]>,
limit: usize,
control: &StorageReadControl,
visit: &mut RecordKeyVisitor<'_>,
) -> VersionResult<()>
fn visit_keys( &self, prefix: &[u8], after: Option<&[u8]>, limit: usize, control: &StorageReadControl, visit: &mut RecordKeyVisitor<'_>, ) -> VersionResult<()>
Visit ordered record identities, including tombstones, without fetching values from providers with key-only access.
Source§fn visit_value(
&self,
key: &[u8],
control: &StorageReadControl,
visit: &mut RecordValueVisitor<'_>,
) -> VersionResult<()>
fn visit_value( &self, key: &[u8], control: &StorageReadControl, visit: &mut RecordValueVisitor<'_>, ) -> VersionResult<()>
Borrow provider-owned bytes for an internal storage visitor. Visitors must not reenter this snapshot or execute SQL/user callbacks.
Source§impl Drop for MemoryRecordSnapshot
impl Drop for MemoryRecordSnapshot
Auto Trait Implementations§
impl !RefUnwindSafe for MemoryRecordSnapshot
impl !UnwindSafe for MemoryRecordSnapshot
impl Freeze for MemoryRecordSnapshot
impl Send for MemoryRecordSnapshot
impl Sync for MemoryRecordSnapshot
impl Unpin for MemoryRecordSnapshot
impl UnsafeUnpin for MemoryRecordSnapshot
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