pub struct WorkflowRuntime { /* private fields */ }Expand description
Non-clone scheduler and display owner for one declared workflow plan.
Implementations§
Source§impl WorkflowRuntime
impl WorkflowRuntime
Sourcepub fn builder(
execution_record_path: impl Into<PathBuf>,
) -> WorkflowRuntimeBuilder
pub fn builder( execution_record_path: impl Into<PathBuf>, ) -> WorkflowRuntimeBuilder
Starts an empty builder with the mandatory execution-record destination.
Sourcepub fn phases(&self) -> &[Phase]
pub fn phases(&self) -> &[Phase]
Borrows all registered phases in deterministic declaration order.
Sourcepub fn execution_plan(&self) -> ExecutionPlan
pub fn execution_plan(&self) -> ExecutionPlan
Materializes a deterministic, side-effect-free description of every registered phase and task.
Sourcepub fn write_execution_plan_json(
&self,
path: impl AsRef<Path>,
) -> Result<(), RuntimeError>
pub fn write_execution_plan_json( &self, path: impl AsRef<Path>, ) -> Result<(), RuntimeError>
Writes the complete registered plan as pretty JSON without running it. An existing byte-identical file is accepted. Different existing content is rejected and never overwritten.
Sourcepub fn phase(&self, id: impl Into<PhaseId>) -> Option<&Phase>
pub fn phase(&self, id: impl Into<PhaseId>) -> Option<&Phase>
Borrows one registered phase by stable ID.
Sourcepub fn cancellation_token(&self) -> CancellationToken
pub fn cancellation_token(&self) -> CancellationToken
Returns a cheap token that can request or observe runtime cancellation.
Sourcepub fn unique_task_matching(
&self,
selector: &TaskSelector,
) -> Result<&Task, RuntimeError>
pub fn unique_task_matching( &self, selector: &TaskSelector, ) -> Result<&Task, RuntimeError>
Returns the unique task matching an exact partial selector.
Sourcepub fn run_phases<I, P>(self, phases: I) -> Result<RuntimeSummary, RuntimeError>
pub fn run_phases<I, P>(self, phases: I) -> Result<RuntimeSummary, RuntimeError>
Runs exactly the selected phases; omitted unsatisfied dependencies fail.
Sourcepub fn run_phases_exact<I, P>(
self,
phases: I,
) -> Result<RuntimeSummary, RuntimeError>
pub fn run_phases_exact<I, P>( self, phases: I, ) -> Result<RuntimeSummary, RuntimeError>
Runs exactly the selected phases; omitted unsatisfied dependencies fail.
Sourcepub fn run_phases_with_dependencies<I, P>(
self,
phases: I,
) -> Result<RuntimeSummary, RuntimeError>
pub fn run_phases_with_dependencies<I, P>( self, phases: I, ) -> Result<RuntimeSummary, RuntimeError>
Adds unsatisfied dependencies and runs the deterministic closure.