mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 22:52:22 +00:00
fix props deserialization (quick-xml doesn't support untagged enums)
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ pub enum CommonPropertiesProp {
|
||||
CurrentUserPrivilegeSet(UserPrivilegeSet),
|
||||
Owner(Option<HrefElement>),
|
||||
|
||||
#[serde(untagged)]
|
||||
#[serde(other)]
|
||||
Invalid,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user