Skip to main content

DatabaseTransaction

Trait DatabaseTransaction 

Source
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§

Source

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

Source

fn begin<'life0, 'async_trait>( conn: &'life0 mut DB, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,

Begin a transaction

Source

fn rollback<'life0, 'async_trait>( conn: &'life0 mut DB, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,

Consumes the transaction rolling back all changes

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§