fix props deserialization (quick-xml doesn't support untagged enums)

This commit is contained in:
Lennart
2024-11-04 21:10:43 +01:00
parent 2143bc850c
commit ff95d65d44
7 changed files with 13 additions and 13 deletions

View File

@@ -81,11 +81,11 @@ pub enum CalendarProp {
// Didn't find the spec // Didn't find the spec
Getctag(String), Getctag(String),
#[serde(skip_deserializing, untagged)] #[serde(skip_deserializing, rename = "$value")]
#[from] #[from]
ExtCommonProperties(CommonPropertiesProp), ExtCommonProperties(CommonPropertiesProp),
#[serde(untagged)] #[serde(other)]
#[default] #[default]
Invalid, Invalid,
} }

View File

@@ -39,11 +39,11 @@ pub enum CalendarObjectProp {
#[serde(rename = "C:calendar-data")] #[serde(rename = "C:calendar-data")]
CalendarData(String), CalendarData(String),
#[serde(skip_deserializing, untagged)] #[serde(skip_deserializing, rename = "$value")]
#[from] #[from]
ExtCommonProperties(CommonPropertiesProp), ExtCommonProperties(CommonPropertiesProp),
#[serde(untagged)] #[serde(other)]
#[default] #[default]
Invalid, Invalid,
} }

View File

@@ -38,11 +38,11 @@ pub enum PrincipalProp {
#[serde(rename = "C:calendar-user-address-set")] #[serde(rename = "C:calendar-user-address-set")]
CalendarUserAddressSet(HrefElement), CalendarUserAddressSet(HrefElement),
#[serde(skip_deserializing, untagged)] #[serde(skip_deserializing, rename = "$value")]
#[from] #[from]
ExtCommonProperties(CommonPropertiesProp), ExtCommonProperties(CommonPropertiesProp),
#[serde(untagged)] #[serde(other)]
#[default] #[default]
Invalid, Invalid,
} }

View File

@@ -40,11 +40,11 @@ pub enum AddressObjectProp {
#[serde(rename = "CARD:address-data")] #[serde(rename = "CARD:address-data")]
AddressData(String), AddressData(String),
#[serde(skip_deserializing, untagged)] #[serde(skip_deserializing, rename = "$value")]
#[from] #[from]
ExtCommonProperties(CommonPropertiesProp), ExtCommonProperties(CommonPropertiesProp),
#[serde(untagged)] #[serde(other)]
#[default] #[default]
Invalid, Invalid,
} }

View File

@@ -66,11 +66,11 @@ pub enum AddressbookProp {
// Didn't find the spec // Didn't find the spec
Getctag(String), Getctag(String),
#[serde(skip_deserializing, untagged)] #[serde(skip_deserializing, rename = "$value")]
#[from] #[from]
ExtCommonProperties(CommonPropertiesProp), ExtCommonProperties(CommonPropertiesProp),
#[serde(untagged)] #[serde(other)]
#[default] #[default]
Invalid, Invalid,
} }

View File

@@ -38,11 +38,11 @@ pub enum PrincipalProp {
#[serde(rename = "CARD:principal-address")] #[serde(rename = "CARD:principal-address")]
PrincipalAddress(Option<HrefElement>), PrincipalAddress(Option<HrefElement>),
#[serde(skip_deserializing, untagged)] #[serde(skip_deserializing, rename = "$value")]
#[from] #[from]
ExtCommonProperties(CommonPropertiesProp), ExtCommonProperties(CommonPropertiesProp),
#[serde(untagged)] #[serde(other)]
#[default] #[default]
Invalid, Invalid,
} }

View File

@@ -33,7 +33,7 @@ pub enum CommonPropertiesProp {
CurrentUserPrivilegeSet(UserPrivilegeSet), CurrentUserPrivilegeSet(UserPrivilegeSet),
Owner(Option<HrefElement>), Owner(Option<HrefElement>),
#[serde(untagged)] #[serde(other)]
Invalid, Invalid,
} }