xavier-internal 0.1.7

Internal module of Xavier. Xavier is a lightweight and versatile XML parsing library designed to streamline the process of handling XML data with ease and efficiency.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::serialize::macro_trait::XmlSerializable;

impl <T: XmlSerializable> XmlSerializable for Option<T> {
    fn to_xml(&self, tag_name: Option<&str>, _: bool) -> String {
        if let Some(value) = &self {
            value.to_xml(tag_name, false)
        } else {
            "".to_string()
        }
    }
}