use serde::{Deserialize, Serialize}; use xcfg::XCfg; #[derive(XCfg, Default, Serialize, Deserialize, PartialEq, Debug, Clone)] pub struct Test { pub a: i32, pub b: Vec, pub sub: SubTest, } impl Test { pub fn new(a: i32, b: Vec, sub: SubTest) -> Self { Self { a, b, sub } } } #[derive(Default, Serialize, Deserialize, PartialEq, Debug, Clone)] pub struct SubTest { pub c: Vec, } impl SubTest { pub fn new(c: Vec) -> Self { Self { c } } }