pub enum Node {
Element {
ifc_type: String,
components: Vec<Component>,
},
Set {
kind: SetKind,
name: String,
members: Vec<Field>,
},
Relationship {
ifc_type: String,
roles: Vec<Role>,
},
Geometry {
tier: String,
digest: String,
},
NameBag {
kind: String,
names: Vec<String>,
},
}Expand description
A node, before it is addressed.
Variants§
Element
A fold of component addresses. Carries no key — see the module docs.
Fields
Set
A named set of scalar members.
Relationship
A relationship: a class and its roles, each role a set of targets.
Targets are node addresses, which keeps the node content-only and
is also where this encoding drops information the source records: two
coincident duplicates have distinct GlobalIds and the source
relationship names one of them, but they share one address, so a
relationship naming either names both. Whether such duplicates are one
node or must be separated — and by what, if not a GlobalId — is the
spec set’s open equivalence policy (02-graph-object-model.md
§2.8); node-address endpoints are the current proposal, not a decision.
A forthcoming dedup-boundary integration suite on #8262 measures this.
Geometry
Geometry for one tier, addressed by the digest the geometry pass already produces rather than re-hashed here.
NameBag
A bag of resolved names: materials, classification references.
Implementations§
Source§impl Node
impl Node
Sourcepub fn encode(&self) -> (Address, Vec<u8>)
pub fn encode(&self) -> (Address, Vec<u8>)
Canonical bytes and the resulting address.
Sets are sorted; lists whose order is content are not. Sorting is by
NFC-normalized UTF-8 bytes (see sort_key) — the same bytes the
encoder writes — so neither input order nor the producer’s choice of
Unicode spelling can reach the hash.