Open Masber opened 8 months ago
Deal serde_yaml community,
I have these structs and entity:
#[derive(Deserialize, Serialize, Debug)] pub struct Ims { name: String, r#type: String, } #[derive(Deserialize, Serialize, Debug)] pub struct Product { name: String, version: String, r#type: String, } #[derive(Deserialize, Serialize, Debug)] pub enum ImageBase { Ims { ims: Ims }, Product { product: Product }, ImageRef { image_ref: String }, } #[derive(Deserialize, Serialize, Debug)] pub struct SatFileImage { pub name: String, pub base: ImageBase, pub configuration: Option<String>, pub configuration_group_names: Option<Vec<String>>, pub ref_name: Option<String>, pub description: Option<String>, }
I have a yaml like
- name: my-name base: ims: name: my-name type: image configuration: my-configuration configuration_group_names: - Compute
And this fails with the following error:
Err( Error("invalid type: map, expected a Value::Tagged enum"), )
Any idea why am I getting this error?
kind regards
Deal serde_yaml community,
I have these structs and entity:
I have a yaml like
And this fails with the following error:
Any idea why am I getting this error?
kind regards