serde compatibility could be extremely useful (like with ts_rs).
The 'Difference' macro should recognize some serde attributes (such as rename or rename_all) and add them to the resulting difference enum.
#[derive(Serialize,Deserialize,Difference)]#[serde(rename_all(serialize = "camelCase"))]#[difference(expose = "ExampleDiff")]structExample{pubid:String,pubdate_of_birthday:String,// dateOfBirthday#[serde(rename = "updatedAt")]pubupdate:String,// updatedAt}Given the previous example, the resulting ExampleDiff enum should have the attribute #[serde(rename_all(serialize = "camelCase"))] and its update variant the attribute #[serde(rename = "updatedAt")].
This ensures that the Example struct and ExampleDiff enum are in sync with their ser(de) counterparts.
serdecompatibility could be extremely useful (like with ts_rs).The 'Difference' macro should recognize some
serdeattributes (such asrenameorrename_all) and add them to the resulting difference enum.Given the previous example, the resulting
ExampleDiffenum should have the attribute#[serde(rename_all(serialize = "camelCase"))]and itsupdatevariant the attribute#[serde(rename = "updatedAt")].This ensures that the
Examplestruct andExampleDiffenum are in sync with their ser(de) counterparts.