Skip to main content

ExecutorOperation

Trait ExecutorOperation 

Source
pub trait ExecutorOperation<S: WorkflowState = State>: Send + Sync {
    // Required method
    fn execute<'life0, 'life1, 'async_trait>(
        &'life0 self,
        engine: &'life1 mut ExecutionEngine<S>,
    ) -> Pin<Box<dyn Future<Output = Result<(), GraphError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

命令式执行控制 — Composite 节点使用。

直接接收 &mut ExecutionEngine<S>,拥有完整能力:

  • clone_state / replace_state
  • build_leaf_context(用于执行子分支)

这不是“节点“,而是 ExecutionEngine 的内部控制逻辑扩展。

Required Methods§

Source

fn execute<'life0, 'life1, 'async_trait>( &'life0 self, engine: &'life1 mut ExecutionEngine<S>, ) -> Pin<Box<dyn Future<Output = Result<(), GraphError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

执行组合操作。

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§