#serde mix
5 messages · Page 1 of 1 (latest)
5 messages · Page 1 of 1 (latest)
so you are saying there is a common set of fields across a bunch of different responses, and you want to generalize this structure over the "rest" of the fields?
check out the field attributges section at serde.rs , there is one called #[serde(flatten)], which will let youy stuff all the "rest" into a struct
yeah give it a shot
#[serde(flatten)]
data: T,
}
i think that will work, anyway...