pub struct FlowGraph { /* private fields */ }Expand description
An immutable declaration of the M3 flow subset.
The worked example lives in the oxide-batch crate documentation, so that
it keeps demonstrating the supported import path.
Implementations§
Source§impl FlowGraph
impl FlowGraph
Sourcepub fn with_transition(self, transition: FlowTransition) -> Self
pub fn with_transition(self, transition: FlowTransition) -> Self
Declares one explicit transition.
Sourcepub fn with_sequence(
self,
source: NodeId,
next: FlowTarget,
) -> Result<Self, PlanError>
pub fn with_sequence( self, source: NodeId, next: FlowTarget, ) -> Result<Self, PlanError>
Declares the convenience sequential edge.
A sequential edge compiles to an exact FAILED transition leading to
TerminalKind::Fail and a less specific * transition leading to
next. Custom successful exit codes therefore continue, while a failed
step ends the job.
§Errors
Returns PlanError::InvalidPattern only if the framework-owned
patterns cannot be constructed.
Sourcepub fn compile(
self,
job_name: &JobName,
revision: DefinitionRevision,
) -> Result<CompiledExecutionPlan, PlanError>
pub fn compile( self, job_name: &JobName, revision: DefinitionRevision, ) -> Result<CompiledExecutionPlan, PlanError>
Validates and normalizes the graph into an immutable plan.
§Errors
Returns PlanError for a missing entry node, a duplicate logical
identifier, an undefined source or target, a node without outgoing
transitions, two equally specific patterns that can match one value, an
unreachable node, a cycle, an exceeded bound, or a manifest that cannot
be encoded within the durable limit.