pub struct ReadTransaction<'a> { /* private fields */ }
Expand description
A read-only transaction
Read-only transactions may exist concurrently with writes
Implementations§
Source§impl<'db> ReadTransaction<'db>
impl<'db> ReadTransaction<'db>
Sourcepub fn open_table<K: RedbKey + 'static, V: RedbValue + 'static>(
&self,
definition: TableDefinition<'_, K, V>,
) -> Result<ReadOnlyTable<'_, K, V>, TableError>
pub fn open_table<K: RedbKey + 'static, V: RedbValue + 'static>( &self, definition: TableDefinition<'_, K, V>, ) -> Result<ReadOnlyTable<'_, K, V>, TableError>
Open the given table
Sourcepub fn open_untyped_table(
&self,
handle: impl TableHandle,
) -> Result<ReadOnlyUntypedTable<'_>, TableError>
pub fn open_untyped_table( &self, handle: impl TableHandle, ) -> Result<ReadOnlyUntypedTable<'_>, TableError>
Open the given table without a type
Sourcepub fn open_multimap_table<K: RedbKey + 'static, V: RedbKey + 'static>(
&self,
definition: MultimapTableDefinition<'_, K, V>,
) -> Result<ReadOnlyMultimapTable<'_, K, V>, TableError>
pub fn open_multimap_table<K: RedbKey + 'static, V: RedbKey + 'static>( &self, definition: MultimapTableDefinition<'_, K, V>, ) -> Result<ReadOnlyMultimapTable<'_, K, V>, TableError>
Open the given table
Sourcepub fn open_untyped_multimap_table(
&self,
handle: impl MultimapTableHandle,
) -> Result<ReadOnlyUntypedMultimapTable<'_>, TableError>
pub fn open_untyped_multimap_table( &self, handle: impl MultimapTableHandle, ) -> Result<ReadOnlyUntypedMultimapTable<'_>, TableError>
Open the given table without a type
Sourcepub fn list_tables(
&self,
) -> Result<impl Iterator<Item = UntypedTableHandle>, StorageError>
pub fn list_tables( &self, ) -> Result<impl Iterator<Item = UntypedTableHandle>, StorageError>
List all the tables
Sourcepub fn list_multimap_tables(
&self,
) -> Result<impl Iterator<Item = UntypedMultimapTableHandle>, StorageError>
pub fn list_multimap_tables( &self, ) -> Result<impl Iterator<Item = UntypedMultimapTableHandle>, StorageError>
List all the multimap tables
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ReadTransaction<'a>
impl<'a> !RefUnwindSafe for ReadTransaction<'a>
impl<'a> Send for ReadTransaction<'a>
impl<'a> Sync for ReadTransaction<'a>
impl<'a> Unpin for ReadTransaction<'a>
impl<'a> !UnwindSafe for ReadTransaction<'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