pub struct XMLBuilder { /* private fields */ }
Expand description
Builder structure used to generate a custom XML structure.
Implementations§
Source§impl XMLBuilder
impl XMLBuilder
Sourcepub fn version(self, version: XMLVersion) -> Self
pub fn version(self, version: XMLVersion) -> Self
Sets the XML version attribute field.
§Arguments
version
- An enum value representing the new version to use for the XML.
Sourcepub fn encoding(self, encoding: String) -> Self
pub fn encoding(self, encoding: String) -> Self
Sets the XML encoding attribute field.
§Arguments
encoding
- A String representing the encoding to use for the document.
Sourcepub fn standalone(self, standalone: Option<bool>) -> Self
pub fn standalone(self, standalone: Option<bool>) -> Self
Sets the standalone attribute for this XML document.
Sourcepub fn sort_attributes(self, sort: bool) -> Self
pub fn sort_attributes(self, sort: bool) -> Self
Enables attributes sorting.
Sourcepub fn break_lines(self, break_lines: bool) -> Self
pub fn break_lines(self, break_lines: bool) -> Self
Sets whether to break lines.
Sets whether to expand empty tags.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for XMLBuilder
impl RefUnwindSafe for XMLBuilder
impl Send for XMLBuilder
impl Sync for XMLBuilder
impl Unpin for XMLBuilder
impl UnwindSafe for XMLBuilder
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