pub struct ConditionNode<S: WorkflowState = State> {
pub name: String,
pub branches: Vec<(String, BranchCondition<S>)>,
}Expand description
条件分支节点。
Fields§
§name: String§branches: Vec<(String, BranchCondition<S>)>Implementations§
Source§impl<S: WorkflowState> ConditionNode<S>
impl<S: WorkflowState> ConditionNode<S>
pub fn builder(name: impl Into<String>) -> ConditionNodeBuilder<S>
Trait Implementations§
Source§impl<S: Clone + WorkflowState> Clone for ConditionNode<S>
impl<S: Clone + WorkflowState> Clone for ConditionNode<S>
Source§impl<S: WorkflowState> FlowNode<S> for ConditionNode<S>
ConditionNode 实现 FlowNode(向后兼容 — 使用 NodeContext)。
impl<S: WorkflowState> FlowNode<S> for ConditionNode<S>
ConditionNode 实现 FlowNode(向后兼容 — 使用 NodeContext)。
Source§fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 mut NodeContext<'life2, S>,
) -> Pin<Box<dyn Future<Output = Result<(), GraphError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 mut NodeContext<'life2, S>,
) -> Pin<Box<dyn Future<Output = Result<(), GraphError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
👎Deprecated since 0.6.0:
Use LeafNode (read-only state + mutations) or ExecutorOperation (composite control) instead.
执行节点逻辑。
Source§impl<S: WorkflowState> LeafNode<S> for ConditionNode<S>
ConditionNode 实现 LeafNode(推荐路径 — 只读 state + goto)。
impl<S: WorkflowState> LeafNode<S> for ConditionNode<S>
ConditionNode 实现 LeafNode(推荐路径 — 只读 state + goto)。
Auto Trait Implementations§
impl<S = State> !RefUnwindSafe for ConditionNode<S>
impl<S = State> !UnwindSafe for ConditionNode<S>
impl<S> Freeze for ConditionNode<S>
impl<S> Send for ConditionNode<S>
impl<S> Sync for ConditionNode<S>
impl<S> Unpin for ConditionNode<S>
impl<S> UnsafeUnpin for ConditionNode<S>
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