structdiff icon indicating copy to clipboard operation
structdiff copied to clipboard

zero-dependency rust crate for generating and applying partial diffs between struct instances

Results 7 structdiff issues
Sort by recently updated
recently updated
newest added

Need to add different strategies for handling collections. Hashmaps/sets are straightforward, but need to decide on better ways than `==` for comparing Vecs/Arrays/LinkedLists/Maps (and allow recursion, probably). - [x] unordered/hashable...

Allow for customization of the generated diff enum serde representation. Currently, each diff is serialized/deserialized using the default `Externally tagged` enum representation, with the key being the field's name and...

`serde` compatibility could be extremely useful (like with [ts_rs](https://docs.rs/ts-rs/latest/ts_rs)). The 'Difference' macro should recognize some `serde` attributes (such as `rename` or `rename_all`) and add them to the resulting difference enum....

`#[difference(recurse)]` does not work with [raw identifiers](https://doc.rust-lang.org/rust-by-example/compatibility/raw_identifiers.html): ```rs #[derive(Difference, Debug, Clone)] pub struct Entity { #[difference(recurse)] pub r#type: MyType, // r# raw } #[derive(Difference, Debug, Clone)] pub struct MyType {...

Allow `#[difference(recurse)]` to be used at the struct level. The latter allows to recursively apply recurse to all struct fields without having to provide `#[difference(recurse)]` for each one. Furthermore, if...

A struct containing `f32` or `f64` can result in the following clippy warning [strict comparison of 'f32' or 'f64'](https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp). Add an option to `#[difference]` (both at the struct and field...