pub struct ReadOnlyTable<'txn, K: RedbKey + 'static, V: RedbValue + 'static> { /* private fields */ }
Expand description
A read-only table
Trait Implementations§
Source§impl<'txn, K: RedbKey + 'static, V: RedbValue + 'static> ReadableTable<K, V> for ReadOnlyTable<'txn, K, V>
impl<'txn, K: RedbKey + 'static, V: RedbValue + 'static> ReadableTable<K, V> for ReadOnlyTable<'txn, K, V>
Source§fn get<'a>(
&self,
key: impl Borrow<K::SelfType<'a>>,
) -> Result<Option<AccessGuard<'_, V>>, StorageError>where
K: 'a,
fn get<'a>(
&self,
key: impl Borrow<K::SelfType<'a>>,
) -> Result<Option<AccessGuard<'_, V>>, StorageError>where
K: 'a,
Returns the value corresponding to the given key
Source§fn range<'a, KR>(
&self,
range: impl RangeBounds<KR> + 'a,
) -> Result<Range<'_, K, V>, StorageError>
fn range<'a, KR>( &self, range: impl RangeBounds<KR> + 'a, ) -> Result<Range<'_, K, V>, StorageError>
Returns a double-ended iterator over a range of elements in the table Read more
Source§fn stats(&self) -> Result<TableStats, StorageError>
fn stats(&self) -> Result<TableStats, StorageError>
Retrieves information about storage usage for the table
Source§fn first(
&self,
) -> Result<Option<(AccessGuard<'_, K>, AccessGuard<'_, V>)>, StorageError>
fn first( &self, ) -> Result<Option<(AccessGuard<'_, K>, AccessGuard<'_, V>)>, StorageError>
Returns the first key-value pair in the table, if it exists
Source§fn last(
&self,
) -> Result<Option<(AccessGuard<'_, K>, AccessGuard<'_, V>)>, StorageError>
fn last( &self, ) -> Result<Option<(AccessGuard<'_, K>, AccessGuard<'_, V>)>, StorageError>
Returns the last key-value pair in the table, if it exists
Auto Trait Implementations§
impl<'txn, K, V> Freeze for ReadOnlyTable<'txn, K, V>
impl<'txn, K, V> !RefUnwindSafe for ReadOnlyTable<'txn, K, V>
impl<'txn, K, V> Send for ReadOnlyTable<'txn, K, V>
impl<'txn, K, V> Sync for ReadOnlyTable<'txn, K, V>
impl<'txn, K, V> Unpin for ReadOnlyTable<'txn, K, V>
impl<'txn, K, V> !UnwindSafe for ReadOnlyTable<'txn, K, V>
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