pub struct XMLBuilder { /* private fields */ }Expand description
Builder structure used to generate a custom XML structure.
Implementations§
Source§impl XMLBuilder
impl XMLBuilder
Sourcepub const fn version(self, version: XMLVersion) -> Self
pub const 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 const fn standalone(self, standalone: Option<bool>) -> Self
pub const fn standalone(self, standalone: Option<bool>) -> Self
Sets the standalone attribute for this XML document.
Sourcepub const fn sort_attributes(self, sort: bool) -> Self
pub const fn sort_attributes(self, sort: bool) -> Self
Enables attributes sorting.
Sourcepub const fn break_lines(self, break_lines: bool) -> Self
pub const 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 UnsafeUnpin 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