Expand description
Labels, tags, plugs, sockets, and wires.
Three tiers per SRD-0005:
- Labels — intrinsic facts (“what this entity is”). Participate in identity and fingerprinting.
- Tags — extrinsic organisation (“how I group/filter this”). Do not participate in identity.
- Plugs and sockets — structured compatibility surface on
elements. Plugs name the upstreams an element needs; sockets
name the points where downstreams connect to it. Each carries a
non-empty set of
(key, value)facets; a plug fits a socket iff the socket’s facets cover (superset) the plug’s.
Wires are the concrete plug↔socket connections the compiler produces
when it resolves an authored dependency — wiring_for returns the
WireMatch for a dependent’s plugs against a target’s sockets.
Namespace-uniqueness across tiers is enforced by
validate_namespace: a single key cannot appear as both a label
key and a tag key, nor as both an attribute key and a port name.
Modules§
- label
- Canonical label keys. Not required on every entity — authoring these spellings lets tooling treat them uniformly.
Structs§
- Facet
- Structured
(key, value)pair on a plug or socket. Canonical human rendering is"key:value". - Facet
Key - Key half of a
(key, value)facet pair on a plug or socket. - Facet
Value - Value half of a
(key, value)facet pair. - Label
Key - Intrinsic-fact key on an attributable entity. Canonical
well-known keys live in
label. - Label
Value - Labels
- Intrinsic-fact map. See module docs and SRD-0005.
- Plug
- A point where an element needs to connect to an upstream.
- Port
Name - Shared name for plugs and sockets. The two kinds live in the
same per-element namespace (SRD-0005 D13): an element may not
have a plug and a socket with the same
PortName. - Socket
- A point where downstream elements connect to this element.
- TagKey
- Organisational tag key. Adopter-defined; paramodel ships no canonical keys at this layer.
- TagValue
- Tags
- Extrinsic-organisation map. See module docs and SRD-0005.
- Wire
- One concrete plug↔socket connection.
Enums§
- Attribute
Error - Errors raised by attribute-layer construction and validation.
- Tier
- Tier a given key was authored on.
- Wire
Match - Outcome of matching a dependent element’s plugs against a target element’s sockets.
Traits§
- Attributed
- Read interface for any entity carrying
LabelsandTags. - Pluggable
- Read interface for elements — adds plugs and sockets on top of
Attributed. Only elements implementPluggableat this layer (SRD-0005 D11).
Functions§
- fits
- Does the plug fit the socket? True iff
socket.facetsis a superset ofplug.facets. - validate_
namespace - Validate the three-tier namespace-uniqueness rule (SRD-0005 D5).
- wiring_
for - Match each plug on the dependent against the target’s sockets,
returning a
WireMatchdescribing the outcome.