Skip to main content

Module enum_ordinal

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§

ReservedOrdinals
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.