pub trait TransactionManager: Send + Sync {
type Error: Send + Sync;
type Tx: TransactionTrait<Error = Self::Error> + Send + Sync;
type Connection: Send + Sync;
// Required methods
fn begin_transaction<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Self::Tx, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn commit_transaction<'life0, 'async_trait>(
tx: &'life0 mut Self::Tx,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn rollback_transaction<'life0, 'async_trait>(
tx: &'life0 mut Self::Tx,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Required Associated Types§
type Error: Send + Sync
type Tx: TransactionTrait<Error = Self::Error> + Send + Sync
type Connection: Send + Sync
Required Methods§
fn begin_transaction<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Self::Tx, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn commit_transaction<'life0, 'async_trait>(
tx: &'life0 mut Self::Tx,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn rollback_transaction<'life0, 'async_trait>(
tx: &'life0 mut Self::Tx,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl TransactionManager for TestDatabaseInstance<PostgresBackend>
Implementation of TransactionManager for PostgreSQL
impl TransactionManager for TestDatabaseInstance<PostgresBackend>
Implementation of TransactionManager for PostgreSQL