pub struct WorkflowEngine { /* private fields */ }Expand description
工作流引擎
Implementations§
Source§impl WorkflowEngine
impl WorkflowEngine
Sourcepub fn new(definition: WorkflowDef) -> Result<Self>
pub fn new(definition: WorkflowDef) -> Result<Self>
创建新的工作流引擎
Sourcepub fn with_executor(self, executor: Arc<dyn TaskExecutor>) -> Self
pub fn with_executor(self, executor: Arc<dyn TaskExecutor>) -> Self
设置任务执行器(旧接口)
Sourcepub fn with_executor_factory(self, factory: ExecutorFactory) -> Self
pub fn with_executor_factory(self, factory: ExecutorFactory) -> Self
设置执行器工厂
Sourcepub fn with_proxy_executor(
self,
executor: Arc<dyn ProxyToolExecutor>,
tool_defs: Vec<ProxyToolDef>,
) -> Self
pub fn with_proxy_executor( self, executor: Arc<dyn ProxyToolExecutor>, tool_defs: Vec<ProxyToolDef>, ) -> Self
设置代理工具执行器
Sourcepub fn register_node_executor(
self,
task_type: &str,
executor: Arc<dyn NodeExecutor>,
) -> Self
pub fn register_node_executor( self, task_type: &str, executor: Arc<dyn NodeExecutor>, ) -> Self
注册节点执行器
Sourcepub fn add_listener(&mut self, listener: Box<dyn EventListener>)
pub fn add_listener(&mut self, listener: Box<dyn EventListener>)
添加事件监听器
Sourcepub fn definition(&self) -> &WorkflowDef
pub fn definition(&self) -> &WorkflowDef
获取工作流定义
Auto Trait Implementations§
impl Freeze for WorkflowEngine
impl !RefUnwindSafe for WorkflowEngine
impl Send for WorkflowEngine
impl Sync for WorkflowEngine
impl Unpin for WorkflowEngine
impl UnsafeUnpin for WorkflowEngine
impl !UnwindSafe for WorkflowEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more