Skip to main content

tank_core/
transaction.rs

1use crate::{Executor, Result};
2
3/// Transactional `Executor` with `commit` and `rollback`.
4pub trait Transaction<'c>: Executor {
5    /// Commit the outstanding changes.
6    fn commit(self) -> impl Future<Output = Result<()>> + Send;
7    /// Rollback any uncommitted changes.
8    fn rollback(self) -> impl Future<Output = Result<()>> + Send;
9}