Enum Variants Strings
Generates conversions of enums from strings and into strings based on variant identifiers
use EnumVariantsStrings;
Identifier mapping
By default variant identifier/names are transformed to their snake case version
This can be changed via #[enum_variants_strings_transform(transform = ...)]
use EnumVariantsStrings;
There are several transforms
"snake_case"
, separate uppercase and numeric boundaries with_
(default)"kebab_case"
, snake case with-
instead of underscores"upper_case"
, uppercase of identifier in source"lower_case"
, lowercase of identifier in source"none"
, no mapping from the identifier in the source