Trait quaint::connector::Transaction
source · pub trait Transaction: Queryable {
// Required methods
fn commit<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn rollback<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn as_queryable(&self) -> &dyn Queryable;
}
Required Methods§
sourcefn commit<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn commit<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Commit the changes to the database and consume the transaction.
sourcefn rollback<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn rollback<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Rolls back the changes to the database.
sourcefn as_queryable(&self) -> &dyn Queryable
fn as_queryable(&self) -> &dyn Queryable
workaround for lack of upcasting between traits https://github.com/rust-lang/rust/issues/65991