pub trait TestConnectionExt: Sized {
type Error;
// Required methods
fn begin_test_transaction<'async_trait>(
self,
) -> Pin<Box<dyn Future<Output = Result<TestTransaction<Self>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait;
fn commit_transaction<'async_trait>(
self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait;
fn rollback_transaction<'async_trait>(
self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait;
}Expand description
Trait for types that can be used as test transaction connections.
Required Associated Types§
Required Methods§
Sourcefn begin_test_transaction<'async_trait>(
self,
) -> Pin<Box<dyn Future<Output = Result<TestTransaction<Self>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
fn begin_test_transaction<'async_trait>(
self,
) -> Pin<Box<dyn Future<Output = Result<TestTransaction<Self>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
Begin a new transaction that will rollback on drop.
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.