pub struct ProximityReadSession<'map, S: Store> { /* private fields */ }Expand description
Reusable exact-read context over one immutable proximity map.
Implementations§
Source§impl<S: Store> ProximityReadSession<'_, S>
impl<S: Store> ProximityReadSession<'_, S>
pub fn get_with<R>( &mut self, key: &[u8], read: impl for<'record> FnOnce(ProximityRecordRef<'record>) -> R, ) -> Result<Option<R>, Error>
Sourcepub fn get_lease(
&mut self,
key: &[u8],
) -> Result<Option<OwnedValueLease>, Error>
pub fn get_lease( &mut self, key: &[u8], ) -> Result<Option<OwnedValueLease>, Error>
Retain the immutable packed leaf containing one encoded exact record. Native adapters validate the record before exposing callback-scoped vector and value views over this lease.
pub fn contains_key(&mut self, key: &[u8]) -> Result<bool, Error>
pub fn scan_records( &mut self, visit: impl for<'record> FnMut(&[u8], ProximityRecordRef<'record>), ) -> Result<u64, Error>
pub fn scan_records_until<B>( &mut self, visit: impl for<'record> FnMut(&[u8], ProximityRecordRef<'record>) -> ControlFlow<B>, ) -> Result<ScanOutcome<B>, Error>
Sourcepub fn scan_records_range_until<B>(
&mut self,
start: &[u8],
end: Option<&[u8]>,
visit: impl for<'record> FnMut(&[u8], ProximityRecordRef<'record>) -> ControlFlow<B>,
) -> Result<ScanOutcome<B>, Error>
pub fn scan_records_range_until<B>( &mut self, start: &[u8], end: Option<&[u8]>, visit: impl for<'record> FnMut(&[u8], ProximityRecordRef<'record>) -> ControlFlow<B>, ) -> Result<ScanOutcome<B>, Error>
Visit a half-open exact-record range with callback-directed early
termination. This is the seekable primitive used by bounded binding
pages; start is inclusive and end is exclusive.
Auto Trait Implementations§
impl<'map, S> Freeze for ProximityReadSession<'map, S>
impl<'map, S> RefUnwindSafe for ProximityReadSession<'map, S>where
S: RefUnwindSafe,
impl<'map, S> Send for ProximityReadSession<'map, S>
impl<'map, S> Sync for ProximityReadSession<'map, S>
impl<'map, S> Unpin for ProximityReadSession<'map, S>
impl<'map, S> UnsafeUnpin for ProximityReadSession<'map, S>
impl<'map, S> UnwindSafe for ProximityReadSession<'map, S>where
S: RefUnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more