pub struct XmlFormatOptions {
pub root_tag: Option<String>,
pub item_tag: String,
pub none_str: String,
pub indent: Option<String>,
}Expand description
Options for XML formatting.
Fields§
§root_tag: Option<String>Root tag name. If None, no root tag is added.
item_tag: StringTag name for items in sequences.
none_str: StringString representation for None values.
indent: Option<String>Indentation string (None for compact output).
Implementations§
Source§impl XmlFormatOptions
impl XmlFormatOptions
Sourcepub fn with_root_tag(self, tag: impl Into<String>) -> Self
pub fn with_root_tag(self, tag: impl Into<String>) -> Self
Set the root tag.
Sourcepub fn with_item_tag(self, tag: impl Into<String>) -> Self
pub fn with_item_tag(self, tag: impl Into<String>) -> Self
Set the item tag for sequences.
Sourcepub fn with_none_str(self, s: impl Into<String>) -> Self
pub fn with_none_str(self, s: impl Into<String>) -> Self
Set the none string representation.
Sourcepub fn with_indent(self, indent: Option<String>) -> Self
pub fn with_indent(self, indent: Option<String>) -> Self
Set the indentation string. None for compact output.
Trait Implementations§
Source§impl Clone for XmlFormatOptions
impl Clone for XmlFormatOptions
Source§fn clone(&self) -> XmlFormatOptions
fn clone(&self) -> XmlFormatOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for XmlFormatOptions
impl Debug for XmlFormatOptions
Auto Trait Implementations§
impl Freeze for XmlFormatOptions
impl RefUnwindSafe for XmlFormatOptions
impl Send for XmlFormatOptions
impl Sync for XmlFormatOptions
impl Unpin for XmlFormatOptions
impl UnwindSafe for XmlFormatOptions
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