Skip to main content

Module execution_engine

Module execution_engine 

Source
Expand description

ExecutionEngine — 执行引擎核心类型。

职责分离:

  • ExecutionEngine<S> — Executor 内部拥有,持有 State、Mutation 缓冲、流发射器等
  • NodeContext<'a, S> / LeafContext<'a, S> — 节点能力视图(在 node_context.rs 中)

数据流单向:

Node
  ↓
ctx.record(Mutation)
  ↓
Mutation Buffer (ExecutionEngine)
  ↓
Engine: take_mutations()
  ↓
state.apply_batch(mutations)
  ↓
State

节点只能通过 record() 声明变更意图,无法直接修改 State。 这保证了 Mutation Log 是唯一写入口,使 Replay、Trace、Parallel Merge、Undo 全部成立。

Structs§

ExecutionControl
控制信号容器 — 节点写入,Executor 读取。
ExecutionEngine
执行引擎 — 拥有所有可变状态,替代 ExecutionContext。
NodeMetadata
节点元数据 — 提供给 Executor 的额外信息。

Enums§

ExecutionSignal
控制信号 — 独立枚举,Barrier 挂起不是路由。
NextAction
节点执行后的下一步路由。

Traits§

ExecutionView
受限视图 — Leaf 节点需要的最小能力。
ExecutorState
完整能力 — Composite 节点 + LeafAdapter 使用。

Type Aliases§

ExecutionContext
向后兼容别名 — ExecutionContextExecutionEngine