Expand description
Multi-version/Multi-format support for Transmog.
This crate is early in development and experimental. A low-level API has been designed and is demonstrated in these examples:
- switching-serializers.rs: Demonstrates switching between serialization formats.
- versioned-serde.rs: Demonstrates switching between major versions of structures.
A high-level procedural macro is being designed to wrap the low-level API.
Re-exports§
pub use transmog;
Structs§
- Unknown
Version - An unknown version was encountered.
Enums§
- Error
- An error from
transmog-versions
.
Traits§
- Const
Versioned - A type that has a constant version number.
- Versioned
- A type that has a version number.
Functions§
- decode
- Decode a payload that may or may not contain a version header. If no header
is found,
callback
is invoked with0
. If a header is found, the parsed version number is passed tocallback
. - unwrap_
version - Decode a payload that may or may not contain a version header. If no header
is found, the result is
(0, data)
. If a header is found, the parsed version number is returned along with a slice reference containing the previously-wrapped data. - wrap
- Wrap
data
with a version header forversioned
, if needed. - write_
header - Write a version header for
versioned
, if needed, towrite
.