Closed
Description
It would be useful to have a way to "inline" struct fields into the parent struct for the purpose of (de)serialization, like this:
#[derive(YaSerialize, YaDeserialize)]
struct Common {
a: i32,
}
#[derive(YaSerialize, YaDeserialize)]
struct Foo {
#[yaserde(flatten)]
common: Common,
foo: u8,
}
#[derive(YaSerialize, YaDeserialize)]
struct Bar {
#[yaserde(flatten)]
common: Common,
bar: u64,
}
Like #[serde(flatten)]