pub struct Transaction<'a> { /* private fields */ }Expand description
A transaction for atomic operations on a symbol table.
Transactions capture the state of the symbol table at the start and allow rolling back to that state if needed.
Implementations§
Source§impl<'a> Transaction<'a>
impl<'a> Transaction<'a>
Sourcepub fn execute<F, R>(&mut self, f: F) -> Result<R, AdapterError>
pub fn execute<F, R>(&mut self, f: F) -> Result<R, AdapterError>
Execute operations within this transaction.
The closure receives a mutable reference to the symbol table.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Transaction<'a>
impl<'a> RefUnwindSafe for Transaction<'a>
impl<'a> Send for Transaction<'a>
impl<'a> Sync for Transaction<'a>
impl<'a> Unpin for Transaction<'a>
impl<'a> UnwindSafe for Transaction<'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