Skip to main content

DecisionExecutor

Trait DecisionExecutor 

Source
pub trait DecisionExecutor: Send + Sync {
    // Required methods
    fn execute<'life0, 'life1, 'async_trait>(
        &'life0 self,
        decision: &'life1 Decision,
    ) -> Pin<Box<dyn Future<Output = DecisionResult<DecisionOutcome>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn rollback<'life0, 'life1, 'async_trait>(
        &'life0 self,
        decision: &'life1 Decision,
    ) -> Pin<Box<dyn Future<Output = DecisionResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for decision executors (actuators)

Required Methods§

Source

fn execute<'life0, 'life1, 'async_trait>( &'life0 self, decision: &'life1 Decision, ) -> Pin<Box<dyn Future<Output = DecisionResult<DecisionOutcome>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute a decision

Source

fn rollback<'life0, 'life1, 'async_trait>( &'life0 self, decision: &'life1 Decision, ) -> Pin<Box<dyn Future<Output = DecisionResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Rollback a decision

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§