pub struct LinkData {
pub source: String,
pub target: String,
pub kind: LinkKind,
pub directed: bool,
pub branch_index: Option<usize>,
pub branch_active: Option<bool>,
}Expand description
A single edge in the D3 graph.
directed is true when this specific link’s direction is known and should render
with an arrowhead from source to target; false renders it as a plain undirected
line. This is a per-link fact, not a sheet-wide one: a cell ↔ relationship link is
directed only once that relationship has a selected method, so one relationship
having a cached plan says nothing about another relationship (or a currently-inactive
conditional branch’s relationship) that doesn’t. A match cell → conditional link is
always directed — evaluating a conditional’s match expression doesn’t depend on any
relationship ever being planned. Control edges are always directed too — from a
conditional node to a relationship, or, when a branch has more than one relationship, from
the conditional to an intermediate Branch node and from that node to each relationship —
and styled by branch_index and branch_active.
Fields§
§source: StringStable string ID of the source node.
target: StringStable string ID of the target node.
kind: LinkKindThe kind of link, determining its visual rendering.
directed: booltrue if this link’s direction is known and should render with an arrowhead.
branch_index: Option<usize>Branch index for Control links; None for Constraint links and default-branch control links.
branch_active: Option<bool>true if this branch is currently active; None for Constraint links.