/// In this example, we use a generic that is not versionable itself. Only its associated types /// should be versioned. use tfhe_versionable::{Versionize, VersionsDispatch}; trait WithAssociated { type Assoc; type OtherAssoc; } struct Marker; impl WithAssociated for Marker { type Assoc = u64; type OtherAssoc = u32; } #[derive(VersionsDispatch)] #[allow(unused)] enum MyStructVersions { V0(MyStruct), } #[derive(Versionize)] #[versionize(MyStructVersions)] struct MyStruct { val: T::Assoc, other_val: T::OtherAssoc, } fn main() { let ms = MyStruct:: { val: 27, other_val: 54, }; ms.versionize(); } #[test] fn test() { main() }