pub trait VersionizeSlice: Sized {
type VersionedSlice<'vers>: Serialize
where Self: 'vers;
// Required method
fn versionize_slice(slice: &[Self]) -> Self::VersionedSlice<'_>;
}Expand description
This trait is used as a proxy to be more flexible when deriving Versionize for Vec<T>.
This way, we can chose to skip versioning Vec<T> if T is a native types but still versionize
in a loop if T is a custom type.
This is used as a workaround for feature(specialization) and to bypass the orphan rule.
Required Associated Types§
type VersionedSlice<'vers>: Serialize where Self: 'vers
Required Methods§
fn versionize_slice(slice: &[Self]) -> Self::VersionedSlice<'_>
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.