pub struct WorkflowParser;Expand description
Parses and validates workflow definitions
Implementations§
Source§impl WorkflowParser
impl WorkflowParser
Sourcepub fn parse_yaml(yaml_content: &str) -> WorkflowResult<Workflow>
pub fn parse_yaml(yaml_content: &str) -> WorkflowResult<Workflow>
Parse a workflow from YAML string
Parses YAML into a Workflow struct, handling nested step configurations and resolving step references and dependencies.
Sourcepub fn parse_json(json_content: &str) -> WorkflowResult<Workflow>
pub fn parse_json(json_content: &str) -> WorkflowResult<Workflow>
Parse a workflow from JSON string
Parses JSON into a Workflow struct, handling nested step configurations and resolving step references and dependencies.
Sourcepub fn to_yaml(workflow: &Workflow) -> WorkflowResult<String>
pub fn to_yaml(workflow: &Workflow) -> WorkflowResult<String>
Serialize a workflow to YAML string
Converts a Workflow struct back to YAML format for round-trip testing.
Sourcepub fn to_json(workflow: &Workflow) -> WorkflowResult<String>
pub fn to_json(workflow: &Workflow) -> WorkflowResult<String>
Serialize a workflow to JSON string
Converts a Workflow struct back to JSON format for round-trip testing.
Sourcepub fn validate(workflow: &Workflow) -> WorkflowResult<()>
pub fn validate(workflow: &Workflow) -> WorkflowResult<()>
Validate a workflow definition
Validates:
- Required fields (id, name, steps)
- Step dependencies (no missing references)
- Circular dependencies in step execution order
- Parameter references
Auto Trait Implementations§
impl Freeze for WorkflowParser
impl RefUnwindSafe for WorkflowParser
impl Send for WorkflowParser
impl Sync for WorkflowParser
impl Unpin for WorkflowParser
impl UnwindSafe for WorkflowParser
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