Struct xml5ever::serialize::XmlSerializer
source · pub struct XmlSerializer<Wr> {
writer: Wr,
namespace_stack: NamespaceMapStack,
}
Expand description
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.
Fields§
§writer: Wr
§namespace_stack: NamespaceMapStack
Implementations§
source§impl<Wr: Write> XmlSerializer<Wr>
impl<Wr: Write> XmlSerializer<Wr>
sourcepub fn new(writer: Wr) -> Self
pub fn new(writer: Wr) -> Self
Creates a new Serializier from a writer and given serialization options.
fn qual_name(&mut self, name: &QualName) -> Result<()>
fn qual_attr_name(&mut self, name: &QualName) -> Result<()>
fn find_uri(&self, name: &QualName) -> bool
fn find_or_insert_ns(&mut self, name: &QualName)
Trait Implementations§
source§impl<Wr: Write> Serializer for XmlSerializer<Wr>
impl<Wr: Write> Serializer for XmlSerializer<Wr>
source§fn start_elem<'a, AttrIter>(
&mut self,
name: QualName,
attrs: AttrIter,
) -> Result<()>
fn start_elem<'a, AttrIter>( &mut self, name: QualName, attrs: AttrIter, ) -> Result<()>
Serializes given start element into text. Start element contains qualified name and an attributes iterator.
Auto Trait Implementations§
impl<Wr> Freeze for XmlSerializer<Wr>where
Wr: Freeze,
impl<Wr> RefUnwindSafe for XmlSerializer<Wr>where
Wr: RefUnwindSafe,
impl<Wr> Send for XmlSerializer<Wr>where
Wr: Send,
impl<Wr> Sync for XmlSerializer<Wr>where
Wr: Sync,
impl<Wr> Unpin for XmlSerializer<Wr>where
Wr: Unpin,
impl<Wr> UnwindSafe for XmlSerializer<Wr>where
Wr: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more