Crate tfhe_versionable_derive

Crate tfhe_versionable_derive 

Source
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 code
  • Version: should be derived on a previous version of this type
  • VersionsDispatch: should be derived ont the enum that holds all the versions of the type
  • NotVersioned: can be used to implement Versionize for a type that is not really versioned

Derive Macrosยง

NotVersioned
This derives the Versionize and Unversionize trait for a type that should not be versioned. The versionize method will simply return self
Version
Implement the Version trait for the target type.
Versionize
This derives the Versionize and Unversionize trait for the target type.
VersionsDispatch
Implement the VersionsDispatch trait 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.