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
pub fn nodes(&self) -> impl ExactSizeIterator
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 moreSource§impl Debug for CompiledExecutionPlan
impl Debug for CompiledExecutionPlan
impl Eq for CompiledExecutionPlan
Source§impl PartialEq for CompiledExecutionPlan
impl PartialEq for CompiledExecutionPlan
impl StructuralPartialEq for CompiledExecutionPlan
Auto Trait Implementations§
impl Freeze for CompiledExecutionPlan
impl RefUnwindSafe for CompiledExecutionPlan
impl Send for CompiledExecutionPlan
impl Sync for CompiledExecutionPlan
impl Unpin for CompiledExecutionPlan
impl UnsafeUnpin for CompiledExecutionPlan
impl UnwindSafe for CompiledExecutionPlan
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more