Skip to main content

PlanGraph

Struct PlanGraph 

Source
pub struct PlanGraph {
    pub nodes: Vec<String>,
    pub edges: Vec<PlanEdge>,
    pub out_edges: Vec<Vec<usize>>,
    pub in_edges: Vec<Vec<usize>>,
    pub scc_of: Vec<usize>,
    pub cycle_edge: Vec<bool>,
    pub retries: Vec<u32>,
    pub bindings: Vec<Option<String>>,
}
Expand description

A validated, indexed plan. Immutable once built — the runtime never mutates a plan, only its own scheduler state.

Fields§

§nodes: Vec<String>§edges: Vec<PlanEdge>§out_edges: Vec<Vec<usize>>

Per node: out-edge indices in declaration order — the canonical evaluation order (§6.2).

§in_edges: Vec<Vec<usize>>§scc_of: Vec<usize>

Per node: SCC id (condensation vertex).

§cycle_edge: Vec<bool>

Per edge: true iff it is a DFS back-edge in the entry-rooted traversal (its destination is an ancestor on the recursion path when the edge is walked) — i.e. it closes a cycle. Removing exactly the back-edges always leaves an acyclic graph (a standard DFS edge-classification theorem), which is what lets the scheduler treat a cycle’s re-entry point as ANY node, not only the plan’s entry: a back-edge into node i cannot possibly have resolved before i’s own first run, so step.rs::refresh_readiness excludes it from i’s generation-0 AND-join (RUN issue #33).

§retries: Vec<u32>

Per node: re-attempt budget (retries[n] = n re-attempts, so up to n+1 executions — §6.3’s pinned reading of the field).

§bindings: Vec<Option<String>>

Per node: the raw binding string from the Workflow (a Tool Definition hash for Bound nodes). Resolution to grains is the driver’s V3/V7.

Implementations§

Source§

impl PlanGraph

Source

pub fn build(wf: &Workflow) -> Result<Self>

Build and validate. Every violation is an error, never a warning — V1/V2 shape errors surface as RUN-E019, unbounded cycles as RUN-E002, unreachable nodes as RUN-E003, bad conditions as RUN-E005.

Source

pub fn terminals(&self) -> Vec<usize>

Terminal nodes: no out-edges (OMS §8.4).

Trait Implementations§

Source§

impl Clone for PlanGraph

Source§

fn clone(&self) -> Self

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 PlanGraph

Source§

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

Formats the value using the given formatter. Read more

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more