mir.enums

Enum utilities.

Members

Functions

getEnumIndex
bool getEnumIndex(T value, uint index)

Enum index that corresponds of the list returned by std.traits.EnumMembers.

unsafeEnumFromIndex
T unsafeEnumFromIndex(size_t index)

Templates

enumIdentifiers
template enumIdentifiers(T)

Static immutable instance of Enum Identifiers.

enumMembers
template enumMembers(T)

Static immutable instance of [std.traits.EnumMembers!T].

enumStrings
template enumStrings(T)

Aliases itself to enumMembers for string enums and enumIdentifiers for integral and floating point enums.

getEnumIndexFromKey
template getEnumIndexFromKey(T, bool caseInsesetive = true, getKeysTemplate...)

Meta

License

Apache-2.0

Authors

Ilya Yaroshenko