Crate serde_diff

Source
Expand description

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 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 and Diff
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§

FieldPathMode
Configures how to serialize field identifiers

Traits§

SerdeDiff
Anything diffable implements this trait

Derive Macros§

SerdeDiff
Examples