pub struct WorkflowConfig {
pub name: String,
pub description: String,
pub version: String,
pub steps: Vec<StepConfig>,
pub variables: HashMap<String, String>,
pub timeout_secs: Option<u64>,
pub default_retry_policy: RetryPolicy,
pub continue_on_failure: bool,
}Expand description
A workflow configuration — the user-facing definition of a workflow.
Workflows are defined in YAML/JSON and compiled into a DAG for execution. Each step specifies what it does and what it depends on.
Fields§
§name: StringUnique workflow name/identifier.
description: StringHuman-readable description.
version: StringVersion of this workflow configuration.
steps: Vec<StepConfig>The steps in this workflow.
variables: HashMap<String, String>Shared context variables (initial values).
timeout_secs: Option<u64>Workflow-level timeout in seconds.
default_retry_policy: RetryPolicyDefault retry policy for steps (can be overridden per-step).
continue_on_failure: boolWhether to continue on step failure.
Implementations§
Source§impl WorkflowConfig
impl WorkflowConfig
Sourcepub fn new(name: impl Into<String>, steps: Vec<StepConfig>) -> Self
pub fn new(name: impl Into<String>, steps: Vec<StepConfig>) -> Self
Create a new workflow config with name and steps.
Sourcepub fn get_step(&self, id: &str) -> Option<&StepConfig>
pub fn get_step(&self, id: &str) -> Option<&StepConfig>
Get a step by ID.
Sourcepub fn effective_retry_policy(&self, step_id: &str) -> RetryPolicy
pub fn effective_retry_policy(&self, step_id: &str) -> RetryPolicy
Get the effective retry policy for a step.
Sourcepub fn effective_timeout(&self, step_id: &str) -> Option<u64>
pub fn effective_timeout(&self, step_id: &str) -> Option<u64>
Get the effective timeout for a step.
Trait Implementations§
Source§impl Clone for WorkflowConfig
impl Clone for WorkflowConfig
Source§impl Debug for WorkflowConfig
impl Debug for WorkflowConfig
Source§impl<'de> Deserialize<'de> for WorkflowConfig
impl<'de> Deserialize<'de> for WorkflowConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for WorkflowConfig
impl PartialEq for WorkflowConfig
Source§impl Serialize for WorkflowConfig
impl Serialize for WorkflowConfig
impl StructuralPartialEq for WorkflowConfig
Auto Trait Implementations§
impl Freeze for WorkflowConfig
impl RefUnwindSafe for WorkflowConfig
impl Send for WorkflowConfig
impl Sync for WorkflowConfig
impl Unpin for WorkflowConfig
impl UnsafeUnpin for WorkflowConfig
impl UnwindSafe for WorkflowConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more