Closed rsdy closed 1 year ago
Also note that serde's rename_all requires that values are string literals, not paths.
Since serde's usecase is equivalent to this, the boilerplate provided by the case.rs
file allows us to straightforwardly plug in heck
to do the conversion if need be. I don't see the reason to use the library at this stage, though, since this is already a comprehensive and well-tested suite.
As for the string literals instead of paths, that's an easy change to make.
Enable a container attribute
rename_all
that uses the renamer rules fromserde
. The following syntax is permitted to rename attributes of a struct or variants of an enum. These changes will not rename the XML tag generated from the struct name itself.The
rename_all
attribute may take on the following values:lowercase
UPPERCASE
PascalCase
camelCase
snake_case
SCREAMING_SNAKE_CASE
kebab-case
SCREAMING-KEBAB-CASE
This PR resolves #17 .