[−][src]Struct xml5ever::serialize::XmlSerializer
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]
&mut self,
name: QualName,
attrs: AttrIter
) -> Result<()> where
AttrIter: Iterator<Item = AttrRef<'a>>,
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]
&mut self,
target: &str,
data: &str
) -> Result<()>
Serializes given processing instruction.
Auto Trait Implementations
impl<Wr> Send for XmlSerializer<Wr> where
Wr: Send,
Wr: Send,
impl<Wr> Sync for XmlSerializer<Wr> where
Wr: Sync,
Wr: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,