serde has a number of ways to allow users to rename fields and types. On struct types, we want to enable:
#[xml(rename = "foo")] struct Foo {}, which would replace the use of Foo with foo
#[xml(rename_all = "PascalCase")] struct Foo {}, which would rename all fields in struct according to the named convention
For fields, we just want to support #[xml(rename = "foo")]. Remember that these can compose, so you might encounter #[xml(rename = "foo", namespace("URI"))].
We'll want to use the heck crate for these conversions. Except for Title Case, I think we want to support all four of heck's support variants.
serde has a number of ways to allow users to rename fields and types. On
struct
types, we want to enable:#[xml(rename = "foo")] struct Foo {}
, which would replace the use ofFoo
withfoo
#[xml(rename_all = "PascalCase")] struct Foo {}
, which would rename all fields instruct
according to the named conventionFor fields, we just want to support
#[xml(rename = "foo")]
. Remember that these can compose, so you might encounter#[xml(rename = "foo", namespace("URI"))]
.We'll want to use the heck crate for these conversions. Except for
Title Case
, I think we want to support all four of heck's support variants.