Struct redb::WriteTransaction
source · [−]pub struct WriteTransaction<'a> { /* private fields */ }
Implementations
sourceimpl<'a> WriteTransaction<'a>
impl<'a> WriteTransaction<'a>
pub fn set_durability(&mut self, durability: Durability)
sourcepub fn open_table<'s: 't, 't, K: RedbKey + ?Sized, V: RedbValue + ?Sized>(
&'s self,
definition: TableDefinition<'_, K, V>
) -> Result<Table<'a, 't, K, V>, Error>
pub fn open_table<'s: 't, 't, K: RedbKey + ?Sized, V: RedbValue + ?Sized>(
&'s self,
definition: TableDefinition<'_, K, V>
) -> Result<Table<'a, 't, K, V>, Error>
Open the given table
The table will be created if it does not exist
sourcepub fn open_multimap_table<'t, K: RedbKey + ?Sized, V: RedbKey + ?Sized>(
&'t self,
definition: MultimapTableDefinition<'_, K, V>
) -> Result<MultimapTable<'a, 't, K, V>, Error>
pub fn open_multimap_table<'t, K: RedbKey + ?Sized, V: RedbKey + ?Sized>(
&'t self,
definition: MultimapTableDefinition<'_, K, V>
) -> Result<MultimapTable<'a, 't, K, V>, Error>
Open the given table
The table will be created if it does not exist
sourcepub fn delete_table<K: RedbKey + ?Sized, V: RedbValue + ?Sized>(
&self,
definition: TableDefinition<'_, K, V>
) -> Result<bool, Error>
pub fn delete_table<K: RedbKey + ?Sized, V: RedbValue + ?Sized>(
&self,
definition: TableDefinition<'_, K, V>
) -> Result<bool, Error>
Delete the given table
Returns a bool indicating whether the table existed
sourcepub fn delete_multimap_table<K: RedbKey + ?Sized, V: RedbKey + ?Sized>(
&self,
definition: MultimapTableDefinition<'_, K, V>
) -> Result<bool, Error>
pub fn delete_multimap_table<K: RedbKey + ?Sized, V: RedbKey + ?Sized>(
&self,
definition: MultimapTableDefinition<'_, K, V>
) -> Result<bool, Error>
Delete the given table
Returns a bool indicating whether the table existed
sourcepub fn list_tables(&self) -> Result<impl Iterator<Item = String> + '_, Error>
pub fn list_tables(&self) -> Result<impl Iterator<Item = String> + '_, Error>
List all the tables
sourcepub fn list_multimap_tables(
&self
) -> Result<impl Iterator<Item = String> + '_, Error>
pub fn list_multimap_tables(
&self
) -> Result<impl Iterator<Item = String> + '_, Error>
List all the multimap tables
pub fn commit(self) -> Result<(), Error>
pub fn abort(self) -> Result<(), Error>
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for WriteTransaction<'a>
impl<'a> !Send for WriteTransaction<'a>
impl<'a> !Sync for WriteTransaction<'a>
impl<'a> Unpin for WriteTransaction<'a>
impl<'a> !UnwindSafe for WriteTransaction<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more