mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 22:52:22 +00:00
Some preparation to parse CalDAV REPORT requests with calendar-data
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use rustical_xml::{ValueDeserialize, ValueSerialize, XmlDeserialize};
|
||||
|
||||
use super::PropfindType;
|
||||
use super::{PropfindType, Propname};
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub enum SyncLevel {
|
||||
@@ -16,7 +16,7 @@ impl ValueDeserialize for SyncLevel {
|
||||
_ => {
|
||||
return Err(rustical_xml::XmlError::InvalidValue(
|
||||
rustical_xml::ParseValueError::Other("Invalid sync-level".to_owned()),
|
||||
))
|
||||
));
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -37,13 +37,13 @@ impl ValueSerialize for SyncLevel {
|
||||
// <!-- DAV:limit defined in RFC 5323, Section 5.17 -->
|
||||
// <!-- DAV:prop defined in RFC 4918, Section 14.18 -->
|
||||
#[xml(ns = "crate::namespace::NS_DAV")]
|
||||
pub struct SyncCollectionRequest {
|
||||
pub struct SyncCollectionRequest<PN: XmlDeserialize = Propname> {
|
||||
#[xml(ns = "crate::namespace::NS_DAV")]
|
||||
pub sync_token: String,
|
||||
#[xml(ns = "crate::namespace::NS_DAV")]
|
||||
pub sync_level: SyncLevel,
|
||||
#[xml(ns = "crate::namespace::NS_DAV", ty = "untagged")]
|
||||
pub prop: PropfindType,
|
||||
pub prop: PropfindType<PN>,
|
||||
#[xml(ns = "crate::namespace::NS_DAV")]
|
||||
pub limit: Option<u64>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user