pub struct CompiledExecutionPlan { /* private fields */ }Expand description
A validated, immutable execution plan.
A plan owns the exact canonical manifest and fingerprint that identify the definition across restart. A plan lowered from a one-step wrapper retains that wrapper’s original format-1 manifest bytes instead of emitting new ones, so lowering never changes a persisted identity.
Implementations§
Source§impl CompiledExecutionPlan
impl CompiledExecutionPlan
Sourcepub const fn definition_identity(&self) -> &DefinitionIdentity
pub const fn definition_identity(&self) -> &DefinitionIdentity
Borrows the restart-relevant definition identity.
Sourcepub const fn manifest_format(&self) -> u16
pub const fn manifest_format(&self) -> u16
Returns the canonical manifest format this plan is identified by.
Sourcepub const fn fingerprint(&self) -> &[u8; 32]
pub const fn fingerprint(&self) -> &[u8; 32]
Returns the SHA-256 definition fingerprint.
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Returns the compiled node count.
Sourcepub fn transition_count(&self) -> usize
pub fn transition_count(&self) -> usize
Returns the compiled transition count.
Sourcepub fn nodes(&self) -> impl ExactSizeIterator<Item = (&NodeId, &FlowNode)>
pub fn nodes(&self) -> impl ExactSizeIterator<Item = (&NodeId, &FlowNode)>
Iterates over compiled nodes in stable logical-identifier order.
The returned order is canonical and independent of builder declaration order. It is useful when binding executable components to an immutable plan before launch.
Sourcepub fn transitions(&self, id: &NodeId) -> &[FlowTransition]
pub fn transitions(&self, id: &NodeId) -> &[FlowTransition]
Borrows one node’s transitions in evaluation order.
The first matching transition wins, so the slice is ordered from the most specific pattern to the least specific one.
Sourcepub fn select_target(
&self,
id: &NodeId,
code: &ExitCode,
) -> Result<&FlowTarget, FlowSelectionError>
pub fn select_target( &self, id: &NodeId, code: &ExitCode, ) -> Result<&FlowTarget, FlowSelectionError>
Selects the target one node’s exit outcome reaches.
§Errors
Returns FlowSelectionError::UnknownNode when id is not compiled
into this plan and FlowSelectionError::UnmappedExitOutcome when no
declared pattern matches code. The plan never selects an arbitrary
default.
Trait Implementations§
Source§impl Clone for CompiledExecutionPlan
impl Clone for CompiledExecutionPlan
Source§fn clone(&self) -> CompiledExecutionPlan
fn clone(&self) -> CompiledExecutionPlan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more