pub struct Edge {
pub start: EdgeEnding,
pub end: EdgeEnding,
}Expand description
Represents a directional connection between nodes in a flow.
Each edge connects two EdgeEndings, which can be either a node or the flow itself.
Fields§
§start: EdgeEndingThe starting point of the edge.
end: EdgeEndingThe ending point of the edge.
Implementations§
Source§impl Edge
impl Edge
Sourcepub const fn passthrough() -> Self
pub const fn passthrough() -> Self
Creates an edge that passes directly through the flow without connecting to any nodes.
Sourcepub const fn flow_to_node(node_idx: usize) -> Self
pub const fn flow_to_node(node_idx: usize) -> Self
Creates an edge connecting the flow to a specific node.
Sourcepub const fn node_to_flow(node_idx: usize) -> Self
pub const fn node_to_flow(node_idx: usize) -> Self
Creates an edge connecting a node to the flow.
Sourcepub const fn node_to_node(start_node_idx: usize, end_node_idx: usize) -> Self
pub const fn node_to_node(start_node_idx: usize, end_node_idx: usize) -> Self
Creates an edge connecting one node to another.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Edge
impl RefUnwindSafe for Edge
impl Send for Edge
impl Sync for Edge
impl Unpin for Edge
impl UnwindSafe for Edge
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