pub struct ReadSession<'manager, 'tree, S: Store> { /* private fields */ }Expand description
Synchronous ready-only facade over the canonical async read session.
Implementations§
Source§impl<'manager, 'tree, S: Store> ReadSession<'manager, 'tree, S>
impl<'manager, 'tree, S: Store> ReadSession<'manager, 'tree, S>
pub fn tree(&self) -> &Tree
pub fn len(&self) -> Result<u64, Error>
pub fn is_empty(&self) -> Result<bool, Error>
pub fn rank(&mut self, key: &[u8]) -> Result<u64, Error>
pub fn get_with<R>( &mut self, key: &[u8], read: impl FnOnce(&[u8]) -> R, ) -> Result<Option<R>, Error>
pub fn get_lease( &mut self, key: &[u8], ) -> Result<Option<OwnedValueLease>, Error>
pub fn get_value_ref_with<R>( &mut self, key: &[u8], read: impl for<'value> FnOnce(ValueRefView<'value>) -> R, ) -> Result<Option<R>, Error>
pub fn contains_key(&mut self, key: &[u8]) -> Result<bool, Error>
pub fn get_many_with<K, F>(&mut self, keys: &[K], visit: F) -> Result<(), Error>
pub fn select_with<R>( &mut self, ordinal: u64, read: impl for<'entry> FnOnce(EntryRef<'entry>) -> R, ) -> Result<Option<R>, Error>
pub fn first_entry_with<R>( &mut self, read: impl for<'entry> FnOnce(EntryRef<'entry>) -> R, ) -> Result<Option<R>, Error>
pub fn last_entry_with<R>( &mut self, read: impl for<'entry> FnOnce(EntryRef<'entry>) -> R, ) -> Result<Option<R>, Error>
pub fn lower_bound_with<R>( &mut self, key: &[u8], read: impl for<'entry> FnOnce(EntryRef<'entry>) -> R, ) -> Result<Option<R>, Error>
pub fn upper_bound_with<R>( &mut self, key: &[u8], read: impl for<'entry> FnOnce(EntryRef<'entry>) -> R, ) -> Result<Option<R>, Error>
pub fn scan_range( &mut self, start: &[u8], end: Option<&[u8]>, visit: impl for<'entry> FnMut(EntryRef<'entry>), ) -> Result<u64, Error>
pub fn scan_range_until<B>( &mut self, start: &[u8], end: Option<&[u8]>, visit: impl for<'entry> FnMut(EntryRef<'entry>) -> ControlFlow<B>, ) -> Result<ScanOutcome<B>, Error>
pub fn scan_prefix( &mut self, prefix: &[u8], visit: impl for<'entry> FnMut(EntryRef<'entry>), ) -> Result<u64, Error>
pub fn scan_prefix_until<B>( &mut self, prefix: &[u8], visit: impl for<'entry> FnMut(EntryRef<'entry>) -> ControlFlow<B>, ) -> Result<ScanOutcome<B>, Error>
pub fn scan_range_reverse( &mut self, start: &[u8], end: Option<&[u8]>, visit: impl for<'entry> FnMut(EntryRef<'entry>), ) -> Result<u64, Error>
pub fn scan_range_reverse_until<B>( &mut self, start: &[u8], end: Option<&[u8]>, visit: impl for<'entry> FnMut(EntryRef<'entry>) -> ControlFlow<B>, ) -> Result<ScanOutcome<B>, Error>
pub fn scan_prefix_reverse( &mut self, prefix: &[u8], visit: impl for<'entry> FnMut(EntryRef<'entry>), ) -> Result<u64, Error>
pub fn scan_prefix_reverse_until<B>( &mut self, prefix: &[u8], visit: impl for<'entry> FnMut(EntryRef<'entry>) -> ControlFlow<B>, ) -> Result<ScanOutcome<B>, Error>
Auto Trait Implementations§
impl<'manager, 'tree, S> Freeze for ReadSession<'manager, 'tree, S>
impl<'manager, 'tree, S> RefUnwindSafe for ReadSession<'manager, 'tree, S>where
S: RefUnwindSafe,
impl<'manager, 'tree, S> Send for ReadSession<'manager, 'tree, S>
impl<'manager, 'tree, S> Sync for ReadSession<'manager, 'tree, S>
impl<'manager, 'tree, S> Unpin for ReadSession<'manager, 'tree, S>
impl<'manager, 'tree, S> UnsafeUnpin for ReadSession<'manager, 'tree, S>
impl<'manager, 'tree, S> UnwindSafe for ReadSession<'manager, 'tree, 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