mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 08:12:24 +00:00
Migrate all deserialization business to rustical_xml
This commit is contained in:
@@ -7,6 +7,7 @@ use rustical_dav::{
|
||||
resource::{Resource, ResourceService},
|
||||
};
|
||||
use rustical_store::{auth::User, AddressObject, AddressbookStore};
|
||||
use rustical_xml::XmlDeserialize;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::sync::Arc;
|
||||
use strum::{EnumDiscriminants, EnumString, VariantNames};
|
||||
@@ -20,7 +21,7 @@ pub struct AddressObjectResourceService<AS: AddressbookStore + ?Sized> {
|
||||
object_id: String,
|
||||
}
|
||||
|
||||
#[derive(Default, Deserialize, Serialize, PartialEq, EnumDiscriminants)]
|
||||
#[derive(Default, XmlDeserialize, Serialize, PartialEq, EnumDiscriminants)]
|
||||
#[strum_discriminants(
|
||||
name(AddressObjectPropName),
|
||||
derive(EnumString, VariantNames),
|
||||
@@ -37,6 +38,7 @@ pub enum AddressObjectProp {
|
||||
AddressData(String),
|
||||
|
||||
#[serde(other)]
|
||||
#[xml(other)]
|
||||
#[strum_discriminants(strum(disabled))]
|
||||
#[default]
|
||||
Invalid,
|
||||
|
||||
Reference in New Issue
Block a user