Structure
A structure (struct, also called a message) is a named data shape. It
carries typed fields.
Fields
A field is name: Type, one per line, in declaration order. A field may be
marked optional and may carry a default.
optional— the field may be absent. Without it, the field is required.= <value>— a default. Any value a constant accepts — a literal, a constant by name, or an integer type's bound (u16::MAX) — plus the bare worddefault(the type's own default, e.g. an enum's first variant). It has to fit the field's type, through anytypealias: au8 = 300or au8 = LIMITwhereLIMITis 300 is an error.
Field types
A field can be any type: a primitive (u32, bool, char[max 64]), a
struct, enum or type alias by name (scoped as pkg::module::Type), an
array (Message[max 100], u8[16]) or a union (union(char[max 64] u32)).
Docstrings and annotations
A docstring (/// lines) documents the struct or a field.
Annotations (@key = value) above a field attach to it, as
@validators does; above the struct, they attach to the
struct, as @deprecated and @settings
do.