mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 08:12:24 +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
|
// 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,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ pub enum CommonPropertiesProp {
|
|||||||
CurrentUserPrivilegeSet(UserPrivilegeSet),
|
CurrentUserPrivilegeSet(UserPrivilegeSet),
|
||||||
Owner(Option<HrefElement>),
|
Owner(Option<HrefElement>),
|
||||||
|
|
||||||
#[serde(untagged)]
|
#[serde(other)]
|
||||||
Invalid,
|
Invalid,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user