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>
impl<'a> RecordRead<'a>
pub fn new( view: &'a MergedRecordSnapshot, database: DatabaseId, control: &'a StorageReadControl, ) -> Self
Trait Implementations§
Source§impl KeyValueRead for RecordRead<'_>
impl KeyValueRead for RecordRead<'_>
fn control(&self) -> &StorageReadControl
Source§fn marker_fingerprint(
&self,
key: &[u8],
) -> StorageBackendResult<Option<[u8; 32]>>
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.
fn revision( &self, prefixes: &[&[u8]], ) -> StorageBackendResult<KeyValueReadRevision>
Source§fn record_revision(
&self,
key: &[u8],
) -> StorageBackendResult<Option<KeyValueReadRevision>>
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>>>
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>>
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.
fn visit_value( &self, key: &[u8], visit: &mut ValueReadVisitor<'_>, ) -> StorageBackendResult<()>
fn visit_prefix( &self, prefix: &[u8], visit: &mut KeyValueReadVisitor<'_>, ) -> StorageBackendResult<()>
Source§fn visit_value_budgeted(
&self,
key: &[u8],
control: &StorageReadControl,
visit: &mut ValueReadVisitor<'_>,
) -> StorageBackendResult<()>
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_value_bounded(
&self,
key: &[u8],
max_bytes: usize,
control: &StorageReadControl,
visit: &mut ValueReadVisitor<'_>,
) -> StorageBackendResult<()>
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<()>
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<()>
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>
fn contains_prefix_budgeted( &self, prefix: &[u8], control: &StorageReadControl, ) -> StorageBackendResult<bool>
Probe live keys on this boundary without materializing their values.
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> 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