fn nameCast(comptime E: type, comptime value: anytype) E

Cast an enum literal, value, or string to the enum value of type E with the same name.

Parameters

E: type,
value: anytype,