Module enum_ordinal
Expand description
Explicit enum ordinals (Pending = 1, @@reserved(4)), the IR half of
docs/design/enum-ordinals.md. The parser fills these in and checks
rules R1–R5; the macros, cratestack-migrate and the client generators
read them back through EnumDecl::is_ordinal.
Structs§
- Reserved
Ordinals - An enum’s
@@reserved(n, …)line: ordinals no variant may use, ever.
Constants§
- ENUM_
ORDINAL_ MAX - The largest ordinal a variant may carry: the column is a
SMALLINT. - ENUM_
RESERVED_ ATTRIBUTE - The block attribute that retires ordinals, so a removed variant’s number can never be handed to a new one.