Skip to main content

Transaction

Trait Transaction 

Source
pub trait Transaction: Queries + 'static {
    // Required methods
    fn commit(self) -> impl Future<Output = Result<(), DbError>> + Send;
    fn rollback(self) -> impl Future<Output = Result<(), DbError>> + Send;
}

Required Methods§

Source

fn commit(self) -> impl Future<Output = Result<(), DbError>> + Send

Source

fn rollback(self) -> impl Future<Output = Result<(), DbError>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<DB> Transaction for SqlxTx<DB>
where DB: Dialect,

Source§

async fn commit(self) -> Result<(), DbError>

Source§

async fn rollback(self) -> Result<(), DbError>

Implementors§