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
Getctag(String),
#[serde(skip_deserializing, untagged)]
#[serde(skip_deserializing, rename = "$value")]
#[from]
ExtCommonProperties(CommonPropertiesProp),
#[serde(untagged)]
#[serde(other)]
#[default]
Invalid,
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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