enum

    As in C, the first member of the enum has a value of zero and each successive value is incremented by one.

    1. X::SomeEnum::One # => One

    You can specify the value of a member:

    The type of an enum member is Int32 by default, even if you specify a different type in a constant value:

    1. lib X
    2. enum SomeEnum
    3. A = 1_u32
    4. end
    5. X::SomeEnum # => 1_i32

    You can use an enum as a type in a parameter or struct or union members:

    1. lib X
    2. One
    3. Two
    4. end