mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 10:32:19 +00:00
minor changes
This commit is contained in:
@@ -26,7 +26,7 @@ impl<T: FromStr + VariantNames> ResourcePropName for T {}
|
|||||||
pub trait ResourceType: Serialize + for<'de> Deserialize<'de> {}
|
pub trait ResourceType: Serialize + for<'de> Deserialize<'de> {}
|
||||||
impl<T: Serialize + for<'de> Deserialize<'de>> ResourceType for T {}
|
impl<T: Serialize + for<'de> Deserialize<'de>> ResourceType for T {}
|
||||||
|
|
||||||
#[derive(Deserialize, Serialize, PartialEq)]
|
#[derive(Deserialize, Serialize, PartialEq, Default)]
|
||||||
#[serde(rename_all = "kebab-case")]
|
#[serde(rename_all = "kebab-case")]
|
||||||
pub enum CommonPropertiesProp {
|
pub enum CommonPropertiesProp {
|
||||||
// WebDAV (RFC 2518)
|
// WebDAV (RFC 2518)
|
||||||
@@ -41,6 +41,7 @@ pub enum CommonPropertiesProp {
|
|||||||
Owner(Option<HrefElement>),
|
Owner(Option<HrefElement>),
|
||||||
|
|
||||||
#[serde(other)]
|
#[serde(other)]
|
||||||
|
#[default]
|
||||||
Invalid,
|
Invalid,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,12 +53,6 @@ pub enum EitherProp<Left: ResourceProp, Right: ResourceProp> {
|
|||||||
Right(Right),
|
Right(Right),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl InvalidProperty for CommonPropertiesProp {
|
|
||||||
fn invalid_property(&self) -> bool {
|
|
||||||
matches!(self, Self::Invalid)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(EnumString, VariantNames, Clone)]
|
#[derive(EnumString, VariantNames, Clone)]
|
||||||
#[strum(serialize_all = "kebab-case")]
|
#[strum(serialize_all = "kebab-case")]
|
||||||
pub enum CommonPropertiesPropName {
|
pub enum CommonPropertiesPropName {
|
||||||
|
|||||||
Reference in New Issue
Block a user