Skip to main content

Module node

Module node 

Source
Expand description

节点核心类型与模块。

v0.4 终态架构:

  • LeafNode<S> — 声明式业务节点,只能读 State + emit Mutation
  • ExecutorOperation<S> — 命令式执行控制,可以 clone/merge/replace_state
  • NodeKind<S, M> — Graph 的 AST(不实现任何执行 trait)
  • FlowNode<S> — 向后兼容,等同于 LeafNode

职责边界:

Graph (AST)
    └── NodeKind

ExecutionEngine (runtime owner)
    ├── dispatch → match NodeKind
    ├── build_leaf_context() → LeafNode
    └── pass &mut self → ExecutorOperation

LeafNode
    └── 只能 emit Mutation

ExecutorOperation
    └── 可以操纵 Executor(fork / merge / replace_state / subgraph)

Re-exports§

pub use super::node_context::LeafContext;
pub use super::barrier_node::BarrierDefaultAction;
pub use super::barrier_node::BarrierNode;
pub use super::parallel_node::ParallelErrorStrategy;
pub use super::parallel_node::ParallelNode;
pub use super::parallel_node::ParallelNodeBuilder;

Structs§

ConditionNode
条件分支节点。
ConditionNodeBuilder
ConditionNode 构建器。
TaskNode
自定义逻辑节点。

Enums§

NodeKind
Graph 的 AST — 节点类型枚举。

Traits§

ExecutorOperation
命令式执行控制 — Composite 节点使用。
FlowNode
向后兼容 — FlowNode trait。
LeafNode
声明式业务节点 — 只能读 State + emit Mutation。

Type Aliases§

BranchCondition
条件分支回调类型别名。
GraphNode
向后兼容别名 — GraphNodeFlowNode
TaskFn
Task 节点回调类型别名(向后兼容 NodeContext)。