Skip to main content

Module registry

Module registry 

Source
Expand description

Entity type definitions and the type registry (ADR-0006).

A plugin entity type is data: a JSON-serializable EntityTypeDef with a typed property schema, derived values, anchors, drawable primitive recipes, constraint templates and property migrations, all written in the expression language of crate::lang. Definitions are compiled (parsed, dimension-checked) at registration; invalid definitions are rejected with typed errors.

Structs§

AnchorDef
An anchor definition.
CircleDef
Circle-like interpretation for circle rules (concentric, tangency, radius).
CompiledTemplate
A compiled constraint template.
CompiledType
A registered, compiled plugin type.
EntityTypeDef
A plugin entity type definition.
MigrationDef
Property migration from from to from + 1.
NamedExpr
A named expression.
ParamInfo
Solver parameter of a plugin entity.
PrimStyle
Style of a primitive recipe.
Registry
The type registry.
TemplateDef
Constraint template instantiated for every entity of the type.
TypeEntry
Registry entry.

Enums§

CompiledPrim
Compiled primitive recipe.
DimName
Physical dimension names used in definitions.
NumberLit
A number literal in a definition: a plain number (canonical units) or a string with a unit such as "60cm".
OnDelete
What happens to a referencing entity when its target is deleted.
PrimitiveDef
Drawable primitive recipe.
PropDef
Property schema.
RegistryError
Registry errors.
StayLevel
How strongly a solver property keeps its previous value when rules force changes (relative stay weight).

Functions§

builtin_members
Members of built-in types usable through typed references.
placeholders
{name} placeholders of a text template.