Skip to main content

enum_

Attribute Macro enum_ 

Source
#[enum_]
Expand description

Declare a named enum using an empty struct and variant(name = "...") attributes. Supports 1–64 unit or typed payload variants. Canonical name order determines stored ordinals; source declaration order does not. Use item(indirect, is = “Self”) for boxed recursion, with a finite base alternative. All-unit enums also convert by reference into ic_db::IndexValue, using the same canonical order. Any payload variant excludes the whole enum from indexes.