pub struct Model {
pub mounts: Vec<Mount>,
pub nodes: Vec<NodeDecl>,
pub refs: Vec<RefDecl>,
pub rels: Vec<RelDecl>,
pub edges: Vec<EdgeDecl>,
pub defs_text: String,
pub aliases: Vec<AliasDecl>,
pub traits: Vec<TraitDecl>,
}Expand description
One parsed model file.
Fields§
§mounts: Vec<Mount>mount NAME: target; — sources the model opens itself.
nodes: Vec<NodeDecl>node /container/role: query; — derived containers.
refs: Vec<RefDecl>ref PATH::field --> container; — scoped references.
rels: Vec<RelDecl>rel SOURCE -> TARGET[cond]; — node-to-node relations.
edges: Vec<EdgeDecl>edge PATH: ::a -- ::b; — pair edges between containers.
defs_text: Stringdef/macro statements, verbatim, joined with ; — seeded
into every constructor query’s fragment table.
aliases: Vec<AliasDecl>alias statements: other spellings a node’s name or trait
answers to (ruling #30 — an alias is a way in, never a way
out; locators and reflection keep the canonical spelling).
traits: Vec<TraitDecl>trait <name>: STEP; — declared traits: a node carries
name exactly when it would match STEP as a step of a path,
decided at the node. In declaration order; a declaration may
use the traits declared before it.