A data type consisting of a set of named values called elements, members or enumerators of the type.
This tag is for questions related to enumeration, enumerated-types (or enums) as related to programming.
In computer programming, an enumerated type (also called enumeration or enum) is a data type consisting of a set of named values called elements, members or enumerators of the type. The enumerator names are usually identifiers that behave as constants in the language. A variable that has been declared as having an enumerated type can be assigned any of the enumerators as a value.
From the wikipedia article on enumerated type
Rust and Swift
Unlike the other languages that take inspiration from c, the enums in rust and swift are sum types (see, for example, sum types in Haskell):