Skip to main content

Module entity

Module entity 

Source
Expand description

The Entity trait and the entity! macro that implements it: one field list per kind (block_model.rs) expands to the struct, its update vocabulary, and the trait impl — the mirror guard is generation, not transcription.

Macros§

entity 🔒
One entity kind from one field list: the struct and its Update enum, plus the Entity impl. Field classes: registers (writable leaves), namespaces (nested vocabularies addressed by descent), constants (creation-time values — no update variant). Serde variant names on the update enum are wire tags: written explicitly, never derived from field names (FlipLR is not FlipLr), never renamed or repurposed — deprecate and add instead. The struct’s field names are the document format’s keys.

Traits§

Entity

Functions§

is_default
Whether a value is its own zero — the suppression predicate every field’s skip_serializing_if names, so “anything at its default is omitted” is one rule rather than one per field type.