1 2 3 4 5 6 7 8 9 10 11 12 13
#[cfg(all(feature = "serde", feature = "sync"))] mod inner { use fieldx::fxstruct; use serde::{Deserialize, Serialize}; #[derive(Clone)] #[fxstruct(sync, get, optional, serde)] struct Foo { foo: i32, } } fn main() {}