pub trait Versionize {
type Versioned<'vers>: Serialize
where Self: 'vers;
// Required method
fn versionize(&self) -> Self::Versioned<'_>;
}Expand description
This trait means that the type can be converted into a versioned equivalent type.
Required Associated Types§
Required Methods§
Sourcefn versionize(&self) -> Self::Versioned<'_>
fn versionize(&self) -> Self::Versioned<'_>
Wraps the object into a versioned enum with a variant for each version. This will use references on the underlying types if possible.
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.