Crate transmog_versions

Source
Expand description

Multi-version/Multi-format support for Transmog.

transmog-versions forbids unsafe code crate version Documentation for main branch

This crate is early in development and experimental. A low-level API has been designed and is demonstrated in these examples:

A high-level procedural macro is being designed to wrap the low-level API.

Re-exports§

pub use transmog;

Structs§

UnknownVersion
An unknown version was encountered.

Enums§

Error
An error from transmog-versions.

Traits§

ConstVersioned
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 with 0. If a header is found, the parsed version number is passed to callback.
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 for versioned, if needed.
write_header
Write a version header for versioned, if needed, to write.