Skip to main content

MemoryRecordSnapshot

Struct MemoryRecordSnapshot 

Source
pub struct MemoryRecordSnapshot { /* private fields */ }
Expand description

One pinned committed sequence. Dropping the last owner releases its lease.

Implementations§

Source§

impl MemoryRecordSnapshot

Source

pub fn sequence(&self) -> CommitSequence

Source

pub fn get(&self, key: &[u8]) -> Option<RecordVersion<SharedRecordValue>>

Return a revision even if its payload is a tombstone.

Source

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

Source§

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.
Source§

fn sequence(&self) -> CommitSequence

Source§

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<()>

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>>

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<()>

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>>

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<()>

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<()>

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

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.