I have input structures and output structures.
I use serde::Deserialize on the input structure and serde::Serialize on the output structures. (easy)
In testing I want to also Serialize the input structures to be able to pass in data and Deserialize output structures to validate.
#[derive(Serialize, Deserialize, Debug)] works but when not testing adds and extra impl.
*** Is there a way to conditionally add Serialize/Deserialize when testing?
I have tried
#[cfg_attr(feature = "test", Deserialize)] NOT Work
#cfg(test, Deserialize)] NOT Work