Expand description
§Parco XML
Parco XML is a zero-copy XML serialization library that targets Exclusive XML Canonicalization i.e: exc-c14n for Rust that also exports quick_xml to handle deserialization
§Usage
ⓘ
use parco_xml::{Xml, xml};
struct MyXML<'a> {
id: &'a str,
value: &'a str,
}
// automatically impl `Xml` trait
xml! {
// ref indicates you have a lifetime in your type
// write `use MyXML;` if you don't have a lifetime
ref MyXML;
// place your namespaces here
@ns {
myxml = "uri:myxml",
}
myxml:Element my_const_attr="constant" id=(self.id) {
(self.value)
}
}§Control Structures
-
Render Nothing: Empty
-
Render conditionally via option: Conditional
-
Render many elements: List
Re-exports§
pub use quick_xml;
Modules§
Macros§
- xml
- Derives Serialization Logic Via Custom DSL Templating
Traits§
- Xml
- A trait the allows you to serialize data to xml