pub enum BlankLines {
Remove,
Preserve,
Truncate,
Insert,
}Expand description
How blank lines between sibling elements are handled.
§Examples
let mut options = svg_format::FormatOptions::default();
options.blank_lines = svg_format::BlankLines::Remove;
let formatted = svg_format::format_with_options("<svg><g/>\n\n<g/></svg>", options);
assert!(!formatted.contains("\n\n"));Variants§
Remove
Strip all blank lines between siblings.
Preserve
Keep blank lines from source verbatim.
Truncate
Collapse 2+ blank lines to exactly 1.
Insert
Force exactly 1 blank line between every sibling.
Trait Implementations§
Source§impl Clone for BlankLines
impl Clone for BlankLines
Source§fn clone(&self) -> BlankLines
fn clone(&self) -> BlankLines
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 BlankLines
Source§impl Debug for BlankLines
impl Debug for BlankLines
Source§impl Default for BlankLines
impl Default for BlankLines
Source§fn default() -> BlankLines
fn default() -> BlankLines
Returns the “default value” for a type. Read more
impl Eq for BlankLines
Source§impl PartialEq for BlankLines
impl PartialEq for BlankLines
impl StructuralPartialEq for BlankLines
Source§impl ValueEnum for BlankLines
impl ValueEnum for BlankLines
Auto Trait Implementations§
impl Freeze for BlankLines
impl RefUnwindSafe for BlankLines
impl Send for BlankLines
impl Sync for BlankLines
impl Unpin for BlankLines
impl UnsafeUnpin for BlankLines
impl UnwindSafe for BlankLines
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