Trait xml5ever::serialize::Serializer [] [src]

pub trait Serializer {
    fn start_elem<'a, AttrIter>(
        &mut self,
        name: QualName,
        attrs: AttrIter
    ) -> Result<(), Error>
    where
        AttrIter: Iterator<Item = (&'a QualName, &'a str)>
;
fn end_elem(&mut self, name: QualName) -> Result<(), Error>;
fn write_text(&mut self, text: &str) -> Result<(), Error>;
fn write_comment(&mut self, text: &str) -> Result<(), Error>;
fn write_doctype(&mut self, name: &str) -> Result<(), Error>;
fn write_processing_instruction(
        &mut self,
        target: &str,
        data: &str
    ) -> Result<(), Error>; }

Types that are capable of serializing implement this trait

Required Methods

Serialize the start of an element, for example <div class="test">.

Serialize the end of an element, for example </div>.

Serialize a plain text node.

Serialize a comment node, for example <!-- comment -->.

Serialize a doctype node, for example <!doctype html>.

Serialize a processing instruction node, for example <?xml-stylesheet type="text/xsl" href="style.xsl"?>.

Implementors