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_nested_flow(self, flow: NestedFlow) -> Self
pub fn with_nested_flow(self, flow: NestedFlow) -> Self
Embeds one reusable flow under a stable structural owner.
Sourcepub fn with_scoped_component(self, component: ScopedComponentDefinition) -> Self
pub fn with_scoped_component(self, component: ScopedComponentDefinition) -> Self
Declares one restart-relevant job- or step-scoped component.
Components are canonicalized by scope and logical component ID during compilation. Duplicate identities fail closed.
Sourcepub fn with_parameter_incrementer_identity(
self,
identity: ParameterIncrementerIdentity,
) -> Self
pub fn with_parameter_incrementer_identity( self, identity: ParameterIncrementerIdentity, ) -> Self
Declares the restart-relevant identity of the parameter incrementer authorized for this definition.
Declaring an incrementer identity opts the graph into manifest format 4.
Sourcepub const fn with_job_restart_policy(self, policy: RestartPolicy) -> Self
pub const fn with_job_restart_policy(self, policy: RestartPolicy) -> Self
Applies the execution-definition restart policy for this job.
A non-restartable declaration opts the definition into manifest format 4. Nested flow declarations may only narrow the enclosing job to non-restartable; they can never reset a non-restartable parent.
Sourcepub const fn job_restart_policy(&self) -> RestartPolicy
pub const fn job_restart_policy(&self) -> RestartPolicy
Returns the declared job restart policy.
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.