mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 14:42:30 +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> {}
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user