Skip to main content

Execution

Trait Execution 

Source
pub trait Execution {
    // Required methods
    fn state(&self) -> &TurnState;
    fn advance(
        &mut self,
        outcome: ActivityOutcome,
        pending_user_message_count: usize,
        now: DateTime<Utc>,
        facts: HostFacts,
    ) -> ExecutionTransition;
}
Expand description

Common contract implemented by immediate and durable turn executions.

The contract is deliberately synchronous and sans I/O. An implementation may keep the state in process, checkpoint it between durable activities, or project it into another scheduler. Stores, queues, clocks, and effect application remain execution-driver concerns.

Required Methods§

Source

fn state(&self) -> &TurnState

Current engine-owned state.

Source

fn advance( &mut self, outcome: ActivityOutcome, pending_user_message_count: usize, now: DateTime<Utc>, facts: HostFacts, ) -> ExecutionTransition

Advance after one completed Input/Reason/Act phase.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§