[−][src]Crate serde_version
Serde version
Versioning support for serde.
When software are developped and used at the same time the data formats may change from one version to another and persisting data may be produced by a specific version and loaded by another version.
Serde version provide a versioning feature for serde for the main use cases.
See the guide here.
Note 1: Requires the specialization feature.
Note 2: Use the derive
feature to generate the DeserializeVersioned
implementation
Goals of Serde version
We aim at solving the case were a type or a set of types in a deserializer's data needs to be upgraded to their latest format. This is the case when a mandatory property was added or removed, or an existing property changed.
Non goals
This is based on types that can be upgraded individually. Types that needs to be upgraded together is way more complex to handle and usually relies on domain specific deserializer.
So, these data format should be handle with specific Deserialize
traits implementations.
Modules
exports |
Macros
__version_group_enum | |
__version_group_resolver_static | |
__version_map_static | |
impl_from_enum | |
version_group_enum | Create an enum that maps an entry to a |
version_group_resolver_new | Instantiate a |
version_group_resolver_static | Generate a static field initialized with specified version groups |
version_map_new | Instantiate a |
version_map_static | Generates a static field initialized with specified |
Structs
InvalidVersionError | Error used when a provided version number is not handled by current code |
TypeInMultipleVersionGroups | |
UnknownVersionURI | |
VersionGroupURI | An uri identifying a version group. |
VersionGroupURIs | A set of version group uris. |
VersionedDeserializer | A wrapper around a deserialize to support the deserialization. |
Enums
AggregateVersionMapError | |
Error | Error wrapper to add the version number related errors |
Traits
AggregateVersionMap | Implement this trait to provide a method to aggregate version maps |
DeserializeVersioned | Trait for versioning support during deserialization |
VersionGroupResolver | Find the |
VersionMap | Maps the version number for each deserialization type name |
Type Definitions
DefaultVersionGroupResolver | |
DefaultVersionMap |