instant-labs / instant-xml

11 stars 3 forks source link

Allow user to rename fields and types #17

Closed djc closed 1 year ago

djc commented 1 year ago

serde has a number of ways to allow users to rename fields and types. On struct types, we want to enable:

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.

djc commented 1 year ago

If we do enum-as-scaler support before this, should implement rename and rename_all for enums, too.