Skip to main content

ToXml

Trait ToXml 

Source
pub trait ToXml {
    // Required method
    fn to_xml(&self) -> String;

    // Provided method
    fn write_xml(&self, writer: &mut String) { ... }
}
Expand description

Trait for types that can be converted to XML

Required Methods§

Source

fn to_xml(&self) -> String

Generate XML representation of this element

Provided Methods§

Source

fn write_xml(&self, writer: &mut String)

Write XML to a string buffer (more efficient for large documents)

Implementors§