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 job_restart_policy(&self) -> RestartPolicy
pub const fn job_restart_policy(&self) -> RestartPolicy
Returns the execution-definition restart policy for this job.
Sourcepub const fn parameter_incrementer_identity(
&self,
) -> Option<&ParameterIncrementerIdentity>
pub const fn parameter_incrementer_identity( &self, ) -> Option<&ParameterIncrementerIdentity>
Borrows the restart-relevant parameter-incrementer identity, when declared.
Sourcepub fn scoped_components(
&self,
) -> impl ExactSizeIterator<Item = &ScopedComponentDefinition>
pub fn scoped_components( &self, ) -> impl ExactSizeIterator<Item = &ScopedComponentDefinition>
Iterates scoped component definitions in canonical scope/ID order.
Sourcepub fn scoped_component(
&self,
scope: ScopeKind,
id: &ScopedComponentId,
) -> Option<&ScopedComponentDefinition>
pub fn scoped_component( &self, scope: ScopeKind, id: &ScopedComponentId, ) -> Option<&ScopedComponentDefinition>
Borrows one scoped component definition by scope and logical ID.
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 const fn root_scope(&self) -> &CompiledFlowScope
pub const fn root_scope(&self) -> &CompiledFlowScope
Borrows the root execution scope.
Sourcepub fn split_branch_scope(
&self,
split: &NodeId,
ordinal: usize,
) -> Option<&CompiledFlowScope>
pub fn split_branch_scope( &self, split: &NodeId, ordinal: usize, ) -> Option<&CompiledFlowScope>
Borrows one M7 split-branch execution scope by zero-based branch ordinal.
Sourcepub fn nested_scope(&self, owner: &NodeId) -> Option<&CompiledFlowScope>
pub fn nested_scope(&self, owner: &NodeId) -> Option<&CompiledFlowScope>
Borrows one flattened nested-flow scope by structural owner ID.
Sourcepub fn decision_sequence(&self, source: &NodeId) -> Option<u64>
pub fn decision_sequence(&self, source: &NodeId) -> Option<u64>
Returns the canonical format-4 decision sequence for one transition source.
Formats 1-3 return None and retain their historical append sequence.
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.