pub struct WorkflowExecutor { /* private fields */ }Expand description
工作流执行器
Implementations§
Source§impl WorkflowExecutor
impl WorkflowExecutor
pub fn new() -> Self
Sourcepub fn register_executor(
&self,
node_type: &str,
executor: Arc<dyn NodeExecutor>,
)
pub fn register_executor( &self, node_type: &str, executor: Arc<dyn NodeExecutor>, )
注册节点执行器
Trait Implementations§
Source§impl Default for WorkflowExecutor
impl Default for WorkflowExecutor
Source§impl WorkflowEngineTrait for WorkflowExecutor
impl WorkflowEngineTrait for WorkflowExecutor
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
input: WorkflowInput,
) -> Pin<Box<dyn Future<Output = Layer2Result<WorkflowOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
input: WorkflowInput,
) -> Pin<Box<dyn Future<Output = Layer2Result<WorkflowOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
执行工作流
Source§fn cancel<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 TaskId,
) -> Pin<Box<dyn Future<Output = Layer2Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cancel<'life0, 'life1, 'async_trait>(
&'life0 self,
task_id: &'life1 TaskId,
) -> Pin<Box<dyn Future<Output = Layer2Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
取消工作流
Source§fn status(&self, task_id: &TaskId) -> Layer2Result<WorkflowStatus>
fn status(&self, task_id: &TaskId) -> Layer2Result<WorkflowStatus>
获取工作流状态
Source§fn node_count(&self) -> usize
fn node_count(&self) -> usize
获取节点数量
Source§fn edge_count(&self) -> usize
fn edge_count(&self) -> usize
获取边数量
Auto Trait Implementations§
impl !Freeze for WorkflowExecutor
impl !RefUnwindSafe for WorkflowExecutor
impl !UnwindSafe for WorkflowExecutor
impl Send for WorkflowExecutor
impl Sync for WorkflowExecutor
impl Unpin for WorkflowExecutor
impl UnsafeUnpin for WorkflowExecutor
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