Track Data Modifications
This library offers a boilerplate free approach to track struct data modifications. For optimization, only the adjusted fields are tracked. Changes will be serialized and sent on an channel.
Features
- Monitoring modifications in data
- Serde based (excluding fields, ...)
- Applying modifications to a type
- Customizable Serialization
Feature Flags
Feature | Description |
---|---|
bincode-serialization |
serialization using bincode (enabled by default) . |
rmp-serialization |
serialization using rmp-serde . |
Optionally implement your own serializer met SerializationStrategy](track/serialization/trait.SerializationStrategy.html).
Examples
First, add track
attribute to mark your struct as trackable.
// imports all necessarily types for the `track` attribute.
use *;
You can specify a serialization method for the track macro. Give the name of the type that implements SerializationStrategy, and make sure it is in scope for the macro. Such as:
use Bincode;
Now let us make some modifications and apply those to other instances.
use ;
For a more in-depth example checkout the examples on github.