Trait aversion::Versioned [−][src]
Expand description
A data structure that has a version number.
A Versioned
data structure is part of a family of data structures,
with the expectation that each new version can be deterministically
created from the older version using the FromVersion
or
IntoVersion
traits.
Associated Types
Associated Constants
The data structure version.
The version field should start at 1, and be incremented each time
a change is made to the data structure. FromVersion
should be
implemented for each new version, to allow automatic upgrading
from the previous version.
The [UpgradeLatest
] trait can be derived, to automatically
upgrade from any old version to the latest version.