Skip to main content

NodeExecutor

Trait NodeExecutor 

Source
pub trait NodeExecutor: Send + Sync {
    // Required methods
    fn execute<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        node: &'life1 NodeDef,
        context: &'life2 mut WorkflowContext,
    ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn name(&self) -> &str;
}
Expand description

NodeExecutor trait - 节点执行器接口

所有节点执行器必须实现此接口,支持异步执行和错误处理。

Required Methods§

Source

fn execute<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, node: &'life1 NodeDef, context: &'life2 mut WorkflowContext, ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

执行节点

Source

fn name(&self) -> &str

执行器名称(用于日志和调试)

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§