pub struct WorkflowDag { /* private fields */ }Expand description
Authoring graph containing workflow nodes, edges, and canvas metadata.
Implementations§
Source§impl WorkflowDag
impl WorkflowDag
Sourcepub fn new(nodes: Vec<WorkflowDagNode>, edges: Vec<WorkflowDagEdge>) -> Self
pub fn new(nodes: Vec<WorkflowDagNode>, edges: Vec<WorkflowDagEdge>) -> Self
Construct a DAG programmatically. Hosts that compile an authoritative product format can use this path without serializing through YAML or JSON first.
Sourcepub fn from_json(source: &str) -> Result<Self, WorkflowDslError>
pub fn from_json(source: &str) -> Result<Self, WorkflowDslError>
Parses a graph from JSON without document-level validation.
Sourcepub fn from_yaml(source: &str) -> Result<Self, WorkflowDslError>
pub fn from_yaml(source: &str) -> Result<Self, WorkflowDslError>
Parses a graph from YAML without document-level validation.
Sourcepub fn to_json(&self) -> Result<String, WorkflowDslError>
pub fn to_json(&self) -> Result<String, WorkflowDslError>
Serializes the graph, including presentation fields, as JSON.
Sourcepub fn nodes(&self) -> &[WorkflowDagNode]
pub fn nodes(&self) -> &[WorkflowDagNode]
Returns nodes in their source authoring order.
Sourcepub fn edges(&self) -> &[WorkflowDagEdge]
pub fn edges(&self) -> &[WorkflowDagEdge]
Returns edges in their source authoring order.
Sourcepub fn extensions(&self) -> &BTreeMap<String, Value>
pub fn extensions(&self) -> &BTreeMap<String, Value>
Returns unknown graph fields preserved during round trips.
Sourcepub fn node(&self, id: &str) -> Option<&WorkflowDagNode>
pub fn node(&self, id: &str) -> Option<&WorkflowDagNode>
Looks up a node by its stable graph identity.
Sourcepub fn execution_plan(&self) -> Result<WorkflowDagPlan, WorkflowDslError>
pub fn execution_plan(&self) -> Result<WorkflowDagPlan, WorkflowDslError>
Validates graph structure and derives deterministic per-scope order.
Sourcepub fn execution_digest(&self) -> Result<String, WorkflowDslError>
pub fn execution_digest(&self) -> Result<String, WorkflowDslError>
Derive a stable identity for executable graph semantics. Canvas layout and authoring order do not affect this digest.
Trait Implementations§
Source§impl Clone for WorkflowDag
impl Clone for WorkflowDag
Source§fn clone(&self) -> WorkflowDag
fn clone(&self) -> WorkflowDag
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more