pub enum TextContentMode {
Collapse,
Maintain,
Prettify,
}Expand description
How the formatter handles whitespace in text nodes.
§Examples
let mut options = svg_format::FormatOptions::default();
options.text_content = svg_format::TextContentMode::Collapse;
let formatted = svg_format::format_with_options("<svg><text>a b</text></svg>", options);
assert!(formatted.contains("a b"));Variants§
Collapse
Collapse runs of whitespace into single spaces, trim lines, skip blanks.
Maintain
Preserve content structure; dedent then re-indent to SVG depth.
Prettify
Trim each line, remove blank lines, re-indent to SVG depth.
Trait Implementations§
Source§impl Clone for TextContentMode
impl Clone for TextContentMode
Source§fn clone(&self) -> TextContentMode
fn clone(&self) -> TextContentMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TextContentMode
Source§impl Debug for TextContentMode
impl Debug for TextContentMode
Source§impl Default for TextContentMode
impl Default for TextContentMode
Source§fn default() -> TextContentMode
fn default() -> TextContentMode
Returns the “default value” for a type. Read more
impl Eq for TextContentMode
Source§impl PartialEq for TextContentMode
impl PartialEq for TextContentMode
impl StructuralPartialEq for TextContentMode
Source§impl ValueEnum for TextContentMode
impl ValueEnum for TextContentMode
Auto Trait Implementations§
impl Freeze for TextContentMode
impl RefUnwindSafe for TextContentMode
impl Send for TextContentMode
impl Sync for TextContentMode
impl Unpin for TextContentMode
impl UnsafeUnpin for TextContentMode
impl UnwindSafe for TextContentMode
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