pub struct NodeDesc {
pub id: String,
pub size: Size,
pub kind: Option<String>,
pub label: Option<String>,
}Expand description
One node: a stable string id plus its card size in terminal cells.
kind and label are caller metadata carried through untouched —
layout never reads them (renderers and 0450’s mermaid mapping do).
Author-written, shape-stable struct: plain fields + Default, the
FRU idiom (NodeDesc { id, size, ..Default::default() }) per
ADR-0003 §2, or the fluent constructors below.
Fields§
§id: StringUnique node id. Duplicate ids are a caller mistake: the first
occurrence wins and the drop is recorded in the layout’s
fallback label (never silent).
size: SizeCard size in cells. Non-positive extents are clamped to 1x1 at layout time so degenerate inputs still produce a usable picture.
kind: Option<String>Optional caller metadata (e.g. a semantic class for theming).
label: Option<String>Optional display label; layout carries it through untouched.