pub trait DatabaseTransaction<DB>where
DB: DatabaseExecutor,{
// Required methods
fn commit<'life0, 'async_trait>(
conn: &'life0 mut DB,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait;
fn begin<'life0, 'async_trait>(
conn: &'life0 mut DB,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait;
fn rollback<'life0, 'async_trait>(
conn: &'life0 mut DB,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait;
}Expand description
Database transaction trait
Required Methods§
Sourcefn commit<'life0, 'async_trait>(
conn: &'life0 mut DB,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
fn commit<'life0, 'async_trait>(
conn: &'life0 mut DB,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Consumes the current transaction committing the changes
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".