mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 05:52:19 +00:00
xml use tuple structs
This commit is contained in:
@@ -4,21 +4,15 @@ use rustical_xml::XmlRootTag;
|
||||
#[derive(Debug, Clone, XmlDeserialize, XmlRootTag, PartialEq)]
|
||||
#[xml(root = b"propfind", ns = "crate::namespace::NS_DAV")]
|
||||
pub struct PropfindElement {
|
||||
#[xml(ty = "untagged")]
|
||||
#[xml(ns = "crate::namespace::NS_DAV")]
|
||||
pub prop: PropfindType,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, XmlDeserialize, PartialEq)]
|
||||
pub struct PropElement {
|
||||
#[xml(ty = "untagged", flatten)]
|
||||
pub prop: Vec<Propname>,
|
||||
}
|
||||
pub struct PropElement(#[xml(ty = "untagged", flatten)] pub Vec<Propname>);
|
||||
|
||||
#[derive(Debug, Clone, XmlDeserialize, PartialEq)]
|
||||
pub struct Propname {
|
||||
#[xml(ty = "tag_name")]
|
||||
pub name: String,
|
||||
}
|
||||
pub struct Propname(#[xml(ty = "tag_name")] pub String);
|
||||
|
||||
#[derive(Debug, Clone, XmlDeserialize, PartialEq)]
|
||||
pub enum PropfindType {
|
||||
|
||||
Reference in New Issue
Block a user