[][src]Struct xml5ever::serialize::XmlSerializer

pub struct XmlSerializer<Wr> { /* fields omitted */ }

Struct used for serializing nodes into a text that other XML parses can read.

Serializer contains a set of functions (start_elem, end_elem...) that make parsing nodes easier.

Methods

impl<Wr: Write> XmlSerializer<Wr>[src]

pub fn new(writer: Wr) -> Self[src]

Creates a new Serializier from a writer and given serialization options.

Trait Implementations

impl<Wr: Write> Serializer for XmlSerializer<Wr>[src]

fn start_elem<'a, AttrIter>(
    &mut self,
    name: QualName,
    attrs: AttrIter
) -> Result<()> where
    AttrIter: Iterator<Item = AttrRef<'a>>, 
[src]

Serializes given start element into text. Start element contains qualified name and an attributes iterator.

fn end_elem(&mut self, name: QualName) -> Result<()>[src]

Serializes given end element into text.

fn write_comment(&mut self, text: &str) -> Result<()>[src]

Serializes comment into text.

fn write_doctype(&mut self, name: &str) -> Result<()>[src]

Serializes given doctype

fn write_text(&mut self, text: &str) -> Result<()>[src]

Serializes text for a node or an attributes.

fn write_processing_instruction(
    &mut self,
    target: &str,
    data: &str
) -> Result<()>
[src]

Serializes given processing instruction.

Auto Trait Implementations

impl<Wr> Send for XmlSerializer<Wr> where
    Wr: Send

impl<Wr> Sync for XmlSerializer<Wr> where
    Wr: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.