Trait tfhe_versionable::VersionizeSlice

source ·
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 felxible when deriving Versionize for Vec. This way, we can chose to skip versioning Vec 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§

source

type VersionedSlice<'vers>: Serialize where Self: 'vers

Required Methods§

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: NotVersioned + Serialize + DeserializeOwned + Clone> VersionizeSlice for T

§

type VersionedSlice<'vers> = &'vers [T] where T: 'vers