pub enum Transaction {
Start {
isolation: Option<IsolationLevel>,
read_only: bool,
},
Commit,
Rollback,
Savepoint(String),
ReleaseSavepoint(String),
RollbackToSavepoint(String),
}Variants§
Start
Start a transaction with optional configuration.
When isolation is None and read_only is false, the database’s
default isolation level and read-write mode are used.
Commit
Commit a transaction
Rollback
Rollback a transaction
Savepoint(String)
Create a savepoint with the given identifier
ReleaseSavepoint(String)
Release (commit) a savepoint
RollbackToSavepoint(String)
Rollback to a savepoint, undoing work since it was created
Implementations§
Source§impl Transaction
impl Transaction
Trait Implementations§
Source§impl Clone for Transaction
impl Clone for Transaction
Source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Transaction
impl Debug for Transaction
Source§impl From<Transaction> for Operation
impl From<Transaction> for Operation
Source§fn from(value: Transaction) -> Self
fn from(value: Transaction) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Transaction
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnwindSafe for Transaction
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