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 refuses as an element id: every keyword token of the
grammar at
RESERVED_GRAMMAR_VERSION(extracted from the language server bundle) plusthis,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_. - RESERVED_
GRAMMAR_ VERSION - The likec4 release whose grammar
RESERVEDwas derived from. The CLI’s tests hold it equal to the release they pin, so a bump fails until the list is re-derived: diff the keyword tokens ofpackages/language-server/src/*.langiumbetween the two tags, probe any new word by validating a model that uses it as a nested element, then move this. - SURVEY_
KINDS - The kinds the survey generates. An external may not declare one of their names: it would be themed and read as the thing it is not.
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.