use serde::{Deserialize, Serialize}; trait AssociatedType { type X; } impl AssociatedType for i32 { type X = i32; } #[derive(Serialize, Deserialize)] struct DefaultTyParam = i32> { phantom: PhantomData, }