Expand description
A small helper that can
- Serialize the fields that differ between two structs of the same type
- 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 when only a small part of a struct has changed.
Macros§
- opaque_
serde_ diff - Implements SerdeDiff on a type given that it impls Serialize + Deserialize + PartialEq. This makes the type a “terminal” type in the SerdeDiff hierarchy, meaning deeper inspection will not be possible. Use the SerdeDiff derive macro for recursive field inspection.
Structs§
- Apply
- A deserializable structure that will apply a sequence of diff commands to the target
- Config
- Configures creation of
Apply
andDiff
- Diff
- A serializable structure that will produce a sequence of diff commands when serialized.
You can pass this to a serializer, or use the convenience method
diff
to pass your serializer along with old/new values to use when serializing the diff.
Enums§
- Field
Path Mode - Configures how to serialize field identifiers
Traits§
- Serde
Diff - Anything diffable implements this trait
Derive Macros§
- Serde
Diff - Examples