pub struct XmlWriter {
pub buf: String,
}Expand description
简单 XML 写出器。
Fields§
§buf: String输出缓冲区。
Implementations§
Source§impl XmlWriter
impl XmlWriter
Sourcepub fn empty_with(&mut self, name: &str, attrs: &[(&str, &str)])
pub fn empty_with(&mut self, name: &str, attrs: &[(&str, &str)])
写自闭合带属性标签。
Sourcepub fn leaf_empty(&mut self, name: &str)
pub fn leaf_empty(&mut self, name: &str)
写一个完整自闭合的元素 <name/>。
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
取内部字符串。
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 UnsafeUnpin 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