#[non_exhaustive]pub enum ExecutionPlan {
Sequence(Vec<ExecutionPlan>),
Parallel(Vec<ExecutionPlan>),
Execute {
node_id: NodeId,
},
Cached {
node_id: NodeId,
key: CacheKey,
},
Loop {
node_id: NodeId,
body: Box<ExecutionPlan>,
max_iterations: Option<usize>,
},
Branch {
node_id: NodeId,
arms: Vec<(String, ExecutionPlan)>,
},
Remote {
node_id: NodeId,
target: RemoteTarget,
plan: Box<ExecutionPlan>,
},
Empty,
}Expand description
A compiled execution plan produced by the compiler.
This is a recursive tree that the runtime walks to execute a pipeline. The compiler resolves caching, parallelism, and distribution before the runtime sees the plan.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Sequence(Vec<ExecutionPlan>)
Execute steps sequentially, one after another.
Parallel(Vec<ExecutionPlan>)
Execute branches concurrently (fork-join).
Execute
Execute a single filter node.
Cached
Load result from cache (resolved at compile time).
Loop
Iterate: execute body for each item in a collection.
Branch
Conditional branching: evaluate condition, pick an arm.
Remote
Execute a sub-plan on a remote worker.
Empty
No-op: nothing to execute (e.g. empty graph).
Implementations§
Source§impl ExecutionPlan
impl ExecutionPlan
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Count total nodes in the plan (Execute + Cached).
Sourcepub fn cached_count(&self) -> usize
pub fn cached_count(&self) -> usize
Count cached nodes in the plan.
Sourcepub fn parallel_branch_count(&self) -> usize
pub fn parallel_branch_count(&self) -> usize
Count parallel branches at the top level of the plan.
Sourcepub fn summary(&self) -> PlanSummary
pub fn summary(&self) -> PlanSummary
Create a PlanSummary for event payloads.
Source§impl ExecutionPlan
impl ExecutionPlan
Sourcepub fn to_mermaid(&self) -> String
pub fn to_mermaid(&self) -> String
Render the execution plan as a Mermaid flowchart.
Trait Implementations§
Source§impl Clone for ExecutionPlan
impl Clone for ExecutionPlan
Source§fn clone(&self) -> ExecutionPlan
fn clone(&self) -> ExecutionPlan
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more