Structs
Named construction initializes every declaration-order field exactly once.
DByte 12.0 · Language
Contract§
struct Pair[A, B]:
first: A
second: B
let pair = Pair[u32, u8](first = 42, second = 1)Mechanics§
Struct identity includes declaration-order fields and canonical field IDs. Named construction initializes each field once; target layout determines offsets, padding, alignment and total size.
Validation and failure§
Unknown, duplicate and missing fields fail. repr(C) and repr(C, packed) reuse the same layout engine; backend code may not recompute offsets.
Evidence and boundary§
Layout inspection and exact field-address native tests bind source fields to the same canonical offsets.