Link Types
Typed relationships between ObjectTypes with cardinality constraints, directionality, and optional edge properties.
Builder Example
Rust
let controls = LinkType::builder("controls")
.description("HVAC unit controls a zone")
.source_type(hvac_type_id)
.target_type(zone_type_id)
.cardinality(Cardinality::OneToMany)
.directionality(Directionality::Directed)
.property(PropertyDef::new("priority", PropertyType::I64))
.build();
let id = type_registry.register_link_type(controls)?; Cardinality
| Variant | Meaning | Example |
|---|---|---|
| OneToOne | Exactly one source → one target | Flight → Aircraft |
| OneToMany | One source → many targets | Zone → HVAC Units |
| ManyToMany | Many ↔ many (default) | Train → Station |
Directionality
| Variant | Traversal |
|---|---|
| Directed | Source → target only (default) |
| Bidirectional | Both directions traversable |
Interfaces
Trait-like capability grouping. An Interface requires specific properties and actions to be present on implementing ObjectTypes.
Rust
let locatable = Interface::builder("Locatable")
.description("Entity with geographic position")
.require_property(PropertyDef::new("lat", PropertyType::F64).required())
.require_property(PropertyDef::new("lon", PropertyType::F64).required())
.require_action(move_action_id)
.build(); Questions?
Reach out for help with integration, deployment, or custom domain codecs.