Expand description
The architecture model every front-end produces and the emitter consumes.
Ids are segment lists (["playwright_rs", "server", "connection"]),
which LikeC4 renders as playwright_rs.server.connection. The model
keeps real names; mapping them to LikeC4 identifiers happens in the
emitter, and Model::validate is what says two names would
collide there.
Structs§
- Deployment
- Deployment nodes and instances. Empty until an infrastructure front-end exists; it is here from day one because LikeC4 keeps a separate deployment model and retrofitting it would rework every front-end.
- Deployment
Instance - Deployment
Node - Element
- Model
- What a front-end found, plus the externals the config adds.
- Relation
Enums§
- Element
Kind - Relation
Kind - Evidence for a relation, strongest first. Aggregation keeps the minimum, so the declared order is the precedence and must not be reordered.
Constants§
- RESERVED
- Words likec4 1.59.3 refuses as an element id: every keyword token of
its grammar (extracted from the language server bundle) plus
this,it,trueandfalse, each confirmed by validating a model with the word as a nested element.model,element,deploymentandrelationshipare accepted and so are not here. A module named one of these gets a trailing_.
Functions§
- dotted
- An id as LikeC4 renders it, before sanitizing: segments joined by
.. - is_
lineal - Whether one id is an ancestor of, a descendant of, or equal to the
other.
mod x;andpub use x::Yare structure, not coupling, so a relation between lineal elements is never recorded. - sanitize_
id - The whole id as a LikeC4 identifier path.
- sanitize_
segment - One segment as a LikeC4 identifier:
-and any other character outside[A-Za-z0-9_]become_, a leading digit gets a_in front of it, and aRESERVEDword gets one after it.
Type Aliases§
- Id
- A fully qualified element id: crate, then module path.