2023-07-19 10:54:11 -05:00
|
|
|
use serde_derive::Deserialize;
|
2023-03-08 21:02:07 -06:00
|
|
|
|
|
|
|
#[derive(Deserialize)]
|
|
|
|
pub struct Nested;
|
|
|
|
|
|
|
|
#[derive(Deserialize)]
|
|
|
|
pub enum ExternallyTagged {
|
|
|
|
Flatten {
|
|
|
|
#[serde(flatten)]
|
|
|
|
nested: Nested,
|
|
|
|
string: &'static str,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Deserialize)]
|
|
|
|
#[serde(tag = "tag")]
|
|
|
|
pub enum InternallyTagged {
|
|
|
|
Flatten {
|
|
|
|
#[serde(flatten)]
|
|
|
|
nested: Nested,
|
|
|
|
string: &'static str,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Deserialize)]
|
|
|
|
#[serde(tag = "tag", content = "content")]
|
|
|
|
pub enum AdjacentlyTagged {
|
|
|
|
Flatten {
|
|
|
|
#[serde(flatten)]
|
|
|
|
nested: Nested,
|
|
|
|
string: &'static str,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Deserialize)]
|
|
|
|
#[serde(untagged)]
|
|
|
|
pub enum UntaggedWorkaround {
|
|
|
|
Flatten {
|
|
|
|
#[serde(flatten)]
|
|
|
|
nested: Nested,
|
|
|
|
string: &'static str,
|
|
|
|
},
|
|
|
|
}
|