1 2 3 4 5 6 7 8 9
use crate::result::Result; use async_trait::async_trait; #[async_trait] pub trait IUnitOfWork: Send { async fn begin(&mut self) -> Result<()>; async fn commit(&mut self) -> Result<()>; async fn abort(&mut self) -> Result<()>; }