pub struct Flow {
pub kind: FlowKind,
pub id: FlowId,
pub description: Option<String>,
pub nodes: FlowNodes,
}Expand description
Canonical .ygtc flow representation.
Fields§
§kind: FlowKindFlow execution kind.
id: FlowIdFlow identifier inside the pack.
description: Option<String>Optional human-friendly summary.
nodes: FlowNodesOrdered node map describing the flow graph.
Implementations§
Source§impl Flow
impl Flow
Sourcepub fn ingress(&self) -> Option<(&NodeId, &Node)>
pub fn ingress(&self) -> Option<(&NodeId, &Node)>
Returns the implicit ingress node (first user-declared entry).
Sourcepub fn validate_structure(&self) -> Result<(), FlowValidationError>
pub fn validate_structure(&self) -> Result<(), FlowValidationError>
Validates the flow structure (at least one node).
Sourcepub fn validate_components<'a, F>(
&self,
resolver: F,
) -> Result<(), FlowValidationError>
pub fn validate_components<'a, F>( &self, resolver: F, ) -> Result<(), FlowValidationError>
Ensures all referenced components exist and support this flow kind.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Flow
impl<'de> Deserialize<'de> for Flow
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
impl StructuralPartialEq for Flow
Auto Trait Implementations§
impl Freeze for Flow
impl RefUnwindSafe for Flow
impl Send for Flow
impl Sync for Flow
impl Unpin for Flow
impl UnwindSafe for Flow
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