Skip to main content

TransactionalDomainService

Trait TransactionalDomainService 

Source
pub trait TransactionalDomainService: DomainService {
    // Required method
    fn with_transaction<'life0, 'async_trait, F, R, E>(
        &'life0 self,
        operation: F,
    ) -> Pin<Box<dyn Future<Output = Result<R, E>> + Send + 'async_trait>>
       where F: FnOnce() -> Result<R, E> + Send + 'async_trait,
             R: Send + 'async_trait,
             E: Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Marker trait for domain services that support transactions.

Required Methods§

Source

fn with_transaction<'life0, 'async_trait, F, R, E>( &'life0 self, operation: F, ) -> Pin<Box<dyn Future<Output = Result<R, E>> + Send + 'async_trait>>
where F: FnOnce() -> Result<R, E> + Send + 'async_trait, R: Send + 'async_trait, E: Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Execute an operation within a transaction context.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§