pub struct XmlWriter { /* private fields */ }Expand description
XML writer helper for building XML strings efficiently
Implementations§
Source§impl XmlWriter
impl XmlWriter
pub fn new() -> Self
pub fn with_capacity(capacity: usize) -> Self
Sourcepub fn xml_declaration(&mut self) -> &mut Self
pub fn xml_declaration(&mut self) -> &mut Self
Write XML declaration
Sourcepub fn start_element(&mut self, name: &str, attrs: &[(&str, &str)]) -> &mut Self
pub fn start_element(&mut self, name: &str, attrs: &[(&str, &str)]) -> &mut Self
Start an element with attributes
Sourcepub fn end_element(&mut self, name: &str) -> &mut Self
pub fn end_element(&mut self, name: &str) -> &mut Self
End an element
Sourcepub fn empty_element(&mut self, name: &str, attrs: &[(&str, &str)]) -> &mut Self
pub fn empty_element(&mut self, name: &str, attrs: &[(&str, &str)]) -> &mut Self
Write a self-closing element
Trait Implementations§
Auto Trait Implementations§
impl Freeze for XmlWriter
impl RefUnwindSafe for XmlWriter
impl Send for XmlWriter
impl Sync for XmlWriter
impl Unpin for XmlWriter
impl UnwindSafe for XmlWriter
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