minor changes

This commit is contained in:
Lennart
2024-11-05 17:24:20 +01:00
parent d5ef6669a6
commit f1c43a8271

View File

@@ -26,7 +26,7 @@ impl<T: FromStr + VariantNames> ResourcePropName for T {}
pub trait ResourceType: Serialize + for<'de> Deserialize<'de> {}
impl<T: Serialize + for<'de> Deserialize<'de>> ResourceType for T {}
#[derive(Deserialize, Serialize, PartialEq)]
#[derive(Deserialize, Serialize, PartialEq, Default)]
#[serde(rename_all = "kebab-case")]
pub enum CommonPropertiesProp {
// WebDAV (RFC 2518)
@@ -41,6 +41,7 @@ pub enum CommonPropertiesProp {
Owner(Option<HrefElement>),
#[serde(other)]
#[default]
Invalid,
}
@@ -52,12 +53,6 @@ pub enum EitherProp<Left: ResourceProp, Right: ResourceProp> {
Right(Right),
}
impl InvalidProperty for CommonPropertiesProp {
fn invalid_property(&self) -> bool {
matches!(self, Self::Invalid)
}
}
#[derive(EnumString, VariantNames, Clone)]
#[strum(serialize_all = "kebab-case")]
pub enum CommonPropertiesPropName {