Trait Executor

Source
pub trait Executor: Sync + Send {
    // Required methods
    fn new<'async_trait>(    ) -> Pin<Box<dyn Future<Output = Arc<RwLock<Self>>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn begin<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), BaseError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn commit<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), BaseError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn rollback<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), BaseError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
}
Expand description

Executor is abstract implementation of whatever storage layer you use. Among examples are RDBMS, Queue, NoSQLs.

Required Methods§

Source

fn new<'async_trait>() -> Pin<Box<dyn Future<Output = Arc<RwLock<Self>>> + Send + 'async_trait>>
where Self: 'async_trait,

Source

fn begin<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), BaseError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn commit<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), BaseError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn rollback<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), BaseError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: '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§