1 use serde_derive::Serialize; 2 3 mod remote { 4 pub struct S { 5 pub a: u16, 6 } 7 } 8 9 #[derive(Serialize)] 10 #[serde(remote = "remote::S")] 11 struct S { 12 a: u8, 13 } 14 main()15 fn main() {} 16