xml: Work on struct serialization

This commit is contained in:
Lennart
2024-12-27 12:40:11 +01:00
parent 5ffc5037db
commit f77333e55d
7 changed files with 102 additions and 17 deletions

View File

@@ -8,10 +8,11 @@ mod value;
pub use de::XmlDeserialize;
pub use de::XmlDocument;
pub use de::XmlRootTag;
pub use error::XmlDeError;
pub use se::XmlSerialize;
pub use se::XmlSerializeRoot;
pub use value::Value;
pub use xml_derive::XmlRootTag;
impl XmlDeserialize for () {
fn deserialize<R: BufRead>(
@@ -58,3 +59,8 @@ impl XmlDeserialize for Unparsed {
Ok(Self(start.to_owned()))
}
}
pub trait XmlRootTag {
fn root_tag() -> &'static [u8];
fn root_ns() -> Option<&'static [u8]>;
}