pub trait Unversionize: VersionizeOwned + Sized {
// Required method
fn unversionize(
versioned: Self::VersionedOwned,
) -> Result<Self, UnversionizeError>;
}Expand description
This trait means that we can convert from a versioned enum into the target type.
This trait can only be implemented on Owned/static types, whereas Versionize can also be
implemented on reference types.
Required Methods§
Sourcefn unversionize(
versioned: Self::VersionedOwned,
) -> Result<Self, UnversionizeError>
fn unversionize( versioned: Self::VersionedOwned, ) -> Result<Self, UnversionizeError>
Creates an object from a versioned enum, and eventually upgrades from previous variants.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.