pub struct Transaction { /* private fields */ }Expand description
Transaction handle for managing database transactions
Implementations§
Source§impl Transaction
impl Transaction
Sourcepub async fn begin(&mut self) -> Result<()>
pub async fn begin(&mut self) -> Result<()>
Begin a new transaction
§Example
let mut tx = client.begin_transaction().await?;
// Perform operations...
tx.commit().await?;Sourcepub fn status(&self) -> TransactionStatus
pub fn status(&self) -> TransactionStatus
Get transaction status
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 moreAuto Trait Implementations§
impl Freeze for Transaction
impl !RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnsafeUnpin 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