Expand description
Set of derive macro to automatically implement the Versionize and Unversionize traits.
The macro defined in this crate are:
Versionize: should be derived on the main type that is used in your codeVersion: should be derived on a previous version of this typeVersionsDispatch: should be derived ont the enum that holds all the versions of the typeNotVersioned: can be used to implementVersionizefor a type that is not really versioned
Derive Macrosยง
- NotVersioned
- This derives the
VersionizeandUnversionizetrait for a type that should not be versioned. Theversionizemethod will simply return self - Version
- Implement the
Versiontrait for the target type. - Versionize
- This derives the
VersionizeandUnversionizetrait for the target type. - Versions
Dispatch - Implement the
VersionsDispatchtrait for the target type. The type where this macro is applied should be an enum where each variant is a version of the type that we want to versionize.