Skip to main content

CompiledExecutionPlan

Struct CompiledExecutionPlan 

Source
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

Source

pub const fn definition_identity(&self) -> &DefinitionIdentity

Borrows the restart-relevant definition identity.

Source

pub const fn manifest_format(&self) -> u16

Returns the canonical manifest format this plan is identified by.

Source

pub const fn fingerprint(&self) -> &[u8; 32]

Returns the SHA-256 definition fingerprint.

Source

pub const fn entry(&self) -> &NodeId

Borrows the entry node identifier.

Source

pub fn node_count(&self) -> usize

Returns the compiled node count.

Source

pub fn transition_count(&self) -> usize

Returns the compiled transition count.

Source

pub fn node(&self, id: &NodeId) -> Option<&FlowNode>

Borrows one compiled node.

Source

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.

Source

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.

Source

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

Source§

fn clone(&self) -> CompiledExecutionPlan

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CompiledExecutionPlan

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for CompiledExecutionPlan

Source§

impl PartialEq for CompiledExecutionPlan

Source§

fn eq(&self, other: &CompiledExecutionPlan) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for CompiledExecutionPlan

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.