Xml

Trait Xml 

Source
pub trait Xml: Sized {
    // Required method
    fn serialize_xml(&self, fmt: &mut Formatter<'_>) -> Result;

    // Provided methods
    fn xml(&self) -> String { ... }
    fn display<'a>(&'a self) -> Display<'a, Self> { ... }
}
Expand description

A trait the allows you to serialize data to xml

Required Methods§

Source

fn serialize_xml(&self, fmt: &mut Formatter<'_>) -> Result

serialize xml to a formatter

Provided Methods§

Source

fn xml(&self) -> String

serialize xml to a string

Source

fn display<'a>(&'a self) -> Display<'a, Self>

serialize xml via std::fmt::Display trait

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: Xml> Xml for &T

Source§

fn serialize_xml(&self, fmt: &mut Formatter<'_>) -> Result

Source§

impl<T: Xml> Xml for &mut T

Source§

fn serialize_xml(&self, fmt: &mut Formatter<'_>) -> Result

Source§

impl<T: Xml> Xml for Box<T>

Source§

fn serialize_xml(&self, fmt: &mut Formatter<'_>) -> Result

Implementors§

Source§

impl Xml for Empty

Source§

impl<T> Xml for List<T>
where T: Xml,

Source§

impl<T: Xml> Xml for Conditional<T>