Reference
Structs
Structs provide lightweight named records with positional field layout. Declaration struct Point { x; y; } Construction and Access let p = Point { x: 10, y: 20 }; putf(p.x); p.y = 30; Notes Struct fields are declared by name only, with no type annotations. Field order is positional in the current runtime contract.
Structs provide lightweight named records with positional field layout.
Declaration
struct Point {
x;
y;
}
Construction and Access
let p = Point { x: 10, y: 20 };
putf(p.x);
p.y = 30;
Notes
- Struct fields are declared by name only, with no type annotations.
- Field order is positional in the current runtime contract.