Defines a generic interface for version tolerant serialization and
implements it for primitive data types using
bincode as backend.
The interface has two components:
VersionMap maps individual structure/enum versions to a root version
(app version). This mapping is required both when serializing or
deserializing structures as it needs to know which version of structure
to serialize for a given target app version.
Versionize trait is implemented for the following primitives:
u8, u16, u32, u64, usize, i8, i16, i32, i64, isize, char, f32, f64,
Known issues and limitations:
- Union serialization is not supported via the
Versionizefor non-repr(C) unions can result in undefined behaviour and MUST be avoided.
- Versionize trait implementations for repr(C) unions must be backed by extensive testing.
- Semantic serialization and deserialization is available only for structures.
pub use version_map::VersionMap;
- Implements readers and writers that compute the CRC64 checksum of the bytes read/written.
- Serialization support for primitive data types.
- A helper to map struct and enum versions to a sequence of root versions. This helper is required to support the versioning of a hierarchy of structures composed of individually versioned structures or enums.
- Versioned serialization/deserialization error definitions.
- Trait that provides an interface for version aware serialization and deserialization. The Versionize proc macro can generate an implementation for a given type if generics are not used, otherwise a manual implementation is required.
- Versioned serialization/deserialization result.