Skip to main content

RecordRead

Struct RecordRead 

Source
pub struct RecordRead<'a> { /* private fields */ }
Expand description

Borrowed Key/Value adapter over an already captured committed/private record view. It does not open or advance a session.

Implementations§

Source§

impl<'a> RecordRead<'a>

Source

pub fn new( view: &'a MergedRecordSnapshot, database: DatabaseId, control: &'a StorageReadControl, ) -> Self

Trait Implementations§

Source§

impl KeyValueRead for RecordRead<'_>

Source§

fn control(&self) -> &StorageReadControl

Source§

fn marker_fingerprint( &self, key: &[u8], ) -> StorageBackendResult<Option<[u8; 32]>>

Versioned identity of both committed and private inputs to one shared change marker. Unlike a final record revision, a private marker cannot hide a changed committed input. Unsupported providers return None.
Source§

fn revision( &self, prefixes: &[&[u8]], ) -> StorageBackendResult<KeyValueReadRevision>

Source§

fn record_revision( &self, key: &[u8], ) -> StorageBackendResult<Option<KeyValueReadRevision>>

Identity of one live record on this fixed view. Unlike a view revision, unrelated commits do not change it. Compare identities only for the same logical key; missing records and tombstones return None. Providers without exact committed/private record provenance must reject this capability.
Source§

fn retained_source( &self, key: &[u8], ) -> StorageBackendResult<Option<Arc<dyn KeyValueRead + Send + Sync>>>

Read source attached to this exact private metadata replacement. Absence never authorizes opening a newer snapshot. Committed values have no attachment; provider wrappers translate the metadata key but preserve the source’s own key space and controls.
Source§

fn retain( &self, _prefixes: &[&[u8]], ) -> StorageBackendResult<Arc<dyn KeyValueRead + Send + Sync>>

Retain this committed/private boundary after the callback returns. Callers may only read the selected prefixes. The default copies selected bytes under this reader’s allowance; versioned providers retain their existing visibility owners without loading values.
Source§

fn visit_value( &self, key: &[u8], visit: &mut ValueReadVisitor<'_>, ) -> StorageBackendResult<()>

Source§

fn visit_prefix( &self, prefix: &[u8], visit: &mut KeyValueReadVisitor<'_>, ) -> StorageBackendResult<()>

Source§

fn visit_value_budgeted( &self, key: &[u8], control: &StorageReadControl, visit: &mut ValueReadVisitor<'_>, ) -> StorageBackendResult<()>

Visit one value on this same boundary, charging temporary provider buffers to the supplied query allowance.
Source§

fn visit_values( &self, keys: &mut KeyValueReadKeyIterator<'_>, visit: &mut KeyValuePointVisitor<'_>, ) -> StorageBackendResult<()>

Borrow requested values in input order on this boundary. Key production and callbacks are internal and must not reenter persistence. A false visitor or an error stops before producing the next key; defaults require only ordinary point reads.
Source§

fn visit_key_presence( &self, keys: &mut KeyValueReadKeyIterator<'_>, visit: &mut KeyPresenceVisitor<'_>, ) -> StorageBackendResult<()>

Probe requested identities in input order without loading their values. The default uses the existing key-only scan capability; versioned readers reuse private selection cursors.
Source§

fn visit_value_bounded( &self, key: &[u8], max_bytes: usize, control: &StorageReadControl, visit: &mut ValueReadVisitor<'_>, ) -> StorageBackendResult<()>

Check a value’s encoded size before provider materialization on this same committed/private view.
Source§

fn visit_prefix_after( &self, prefix: &[u8], after: Option<&[u8]>, limit: usize, control: &StorageReadControl, visit: &mut KeyValueReadVisitor<'_>, ) -> StorageBackendResult<()>

Visit at most limit values in key order, strictly after after, without advancing this read boundary.
Source§

fn visit_keys_after( &self, prefix: &[u8], after: Option<&[u8]>, limit: usize, control: &StorageReadControl, visit: &mut KeyReadVisitor<'_>, ) -> StorageBackendResult<()>

Visit at most limit live keys in ascending order, strictly after after, without reading their values or advancing this boundary. Capable wrappers must preserve this key-only contract.
Source§

fn contains_prefix_budgeted( &self, prefix: &[u8], control: &StorageReadControl, ) -> StorageBackendResult<bool>

Probe live keys on this boundary without materializing their values.
Source§

fn get(&self, key: &[u8]) -> StorageBackendResult<Option<BudgetedVec<u8>>>

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for RecordRead<'a>

§

impl<'a> !UnwindSafe for RecordRead<'a>

§

impl<'a> Freeze for RecordRead<'a>

§

impl<'a> Send for RecordRead<'a>

§

impl<'a> Sync for RecordRead<'a>

§

impl<'a> Unpin for RecordRead<'a>

§

impl<'a> UnsafeUnpin for RecordRead<'a>

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.