Struct radarbase::ReadOnlyTransaction
source · pub struct ReadOnlyTransaction<'mmap, K: RadbKey + ?Sized> {
storage: &'mmap Storage,
root_page: Option<u64>,
table_id: u64,
_key_type: PhantomData<K>,
}
Fields§
§storage: &'mmap Storage
§root_page: Option<u64>
§table_id: u64
§_key_type: PhantomData<K>
Implementations§
source§impl<'mmap, K: RadbKey + ?Sized> ReadOnlyTransaction<'mmap, K>
impl<'mmap, K: RadbKey + ?Sized> ReadOnlyTransaction<'mmap, K>
pub(crate) fn new( table_id: u64, storage: &'mmap Storage ) -> ReadOnlyTransaction<'mmap, K>
pub fn get(&self, key: &K) -> Result<Option<AccessGuard<'mmap>>, Error>
pub fn get_range<'a, T: RangeBounds<&'a [u8]>>( &'a self, range: T ) -> Result<BinarytreeRangeIter<'_, T, K>, Error>
pub fn get_range_reversed<'a, T: RangeBounds<&'a [u8]>>( &'a self, range: T ) -> Result<BinarytreeRangeIter<'_, T, K>, Error>
pub fn len(&self) -> Result<usize, Error>
pub fn is_empty(&self) -> Result<bool, Error>
Auto Trait Implementations§
impl<'mmap, K> !RefUnwindSafe for ReadOnlyTransaction<'mmap, K>
impl<'mmap, K> !Send for ReadOnlyTransaction<'mmap, K>
impl<'mmap, K> !Sync for ReadOnlyTransaction<'mmap, K>
impl<'mmap, K: ?Sized> Unpin for ReadOnlyTransaction<'mmap, K>where
K: Unpin,
impl<'mmap, K> !UnwindSafe for ReadOnlyTransaction<'mmap, K>
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