A small helper that can 1. Serialize the fields that differ between two structs of the same type 2. Apply previously serialized field differences to other structs.
The SerdeDiff trait impl can serialize field paths recursively, greatly reducing the amount of data that needs to be serialized.
TODO: crates.io badge
Works for most basic use-cases. Includes derive macro, some standard library type implementations and deep serde integration. Supports diffing Vec
On a struct: ```
```
Serialize & apply differences:
bincode
let bincode_data = bincode::serialize(&Diff::serializable(&old, &new)).unwrap();
bincode::config()
.deserialize_seed(Apply::deserializable(&mut target), &bincode_data)
.unwrap();
serde_json
let mut deserializer = serde_json::Deserializer::from_str(&json_data);
Apply::apply(&mut deserializer, &mut target).unwrap();
All contributions are assumed to be dual-licensed under MIT/Apache-2.
Distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT.