Skip to main content

Module graph

Module graph 

Source
Expand description

Graph 和 GraphBuilder。

Edge 三类边模型:

  • 条件边 (edge_if) — if/else-if 规则链,按注册顺序求值,first match wins
  • 普通边 (edge) — 无条件非 fallback,条件边无命中时生效
  • Fallback 边 (edge_fallback) — 最后兜底

v0.4+: 泛型化 Graph<S: WorkflowState>,默认 S = State(向后兼容)。

运行时安全由 GraphExecutor::max_steps 统一负责。

Structs§

CycleAnalysis
环分析诊断结果。
Edge
边(Edge)— 三类边模型。
EdgeAnalysis
分析用约束 — 仅用于 analyze_cycles() 静态分析。
Graph
图(Graph)— 允许有环,循环保护由 GraphExecutor::max_steps 运行时熔断提供。
GraphBuilder
Graph 构建器。
PendingEdge
待完成的边 — 链式调用的中间句柄。

Type Aliases§

EdgeCondition
边条件回调类型别名。