diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-05-28 13:59:40 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-05-28 13:59:40 +0200 |
commit | 171a762768aabd799a1012d2fb939d869ff53f7b (patch) | |
tree | f375107c43ea3e57762548c777c5a8b9d15e6f69 /aero-dav/src/realization.rs | |
parent | 410d663a5ecbb6ca46ac049227afdaaaf50ac27f (diff) | |
download | aerogramme-171a762768aabd799a1012d2fb939d869ff53f7b.tar.gz aerogramme-171a762768aabd799a1012d2fb939d869ff53f7b.zip |
implement sync multistatus extension
Diffstat (limited to 'aero-dav/src/realization.rs')
-rw-r--r-- | aero-dav/src/realization.rs | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/aero-dav/src/realization.rs b/aero-dav/src/realization.rs index 1e6f25e..76170f8 100644 --- a/aero-dav/src/realization.rs +++ b/aero-dav/src/realization.rs @@ -74,7 +74,7 @@ impl dav::Extension for All { type ResourceType = ResourceType; type ReportType = ReportType<All>; type ReportTypeName = ReportTypeName; - type Multistatus = Disabled; + type Multistatus = Multistatus; } #[derive(Debug, PartialEq, Clone)] @@ -236,3 +236,25 @@ impl xml::QWrite for ReportTypeName { } } } + +#[derive(Debug, PartialEq, Clone)] +pub enum Multistatus { + Sync(sync::Multistatus), +} + +impl xml::QWrite for Multistatus { + async fn qwrite( + &self, + xml: &mut xml::Writer<impl xml::IWrite>, + ) -> Result<(), quick_xml::Error> { + match self { + Self::Sync(s) => s.qwrite(xml).await, + } + } +} + +impl xml::QRead<Multistatus> for Multistatus { + async fn qread(xml: &mut xml::Reader<impl xml::IRead>) -> Result<Self, error::ParsingError> { + sync::Multistatus::qread(xml).await.map(Self::Sync) + } +} |