Trait XmlSerialize

Source
pub trait XmlSerialize {
    // Required methods
    fn serialize<W: Write>(
        &self,
        ns: Option<Namespace<'_>>,
        tag: Option<&[u8]>,
        namespaces: &HashMap<Namespace<'_>, &[u8]>,
        writer: &mut Writer<W>,
    ) -> Result<()>;
    fn attributes<'a>(
        &self,
    ) -> Option<impl IntoIterator<Item: Into<Attribute<'a>>>>;
}

Required Methods§

Source

fn serialize<W: Write>( &self, ns: Option<Namespace<'_>>, tag: Option<&[u8]>, namespaces: &HashMap<Namespace<'_>, &[u8]>, writer: &mut Writer<W>, ) -> Result<()>

Source

fn attributes<'a>(&self) -> Option<impl IntoIterator<Item: Into<Attribute<'a>>>>

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 XmlSerialize for ()

Source§

fn serialize<W: Write>( &self, ns: Option<Namespace<'_>>, tag: Option<&[u8]>, namespaces: &HashMap<Namespace<'_>, &[u8]>, writer: &mut Writer<W>, ) -> Result<()>

Source§

fn attributes<'a>(&self) -> Option<Vec<Attribute<'a>>>

Source§

impl<T: XmlSerialize> XmlSerialize for Option<T>

Source§

fn serialize<W: Write>( &self, ns: Option<Namespace<'_>>, tag: Option<&[u8]>, namespaces: &HashMap<Namespace<'_>, &[u8]>, writer: &mut Writer<W>, ) -> Result<()>

Source§

fn attributes<'a>(&self) -> Option<Vec<Attribute<'a>>>

Implementors§