pub enum WrappedAttributeIndent {
OneLevel,
AlignToTagName,
}Expand description
Indentation strategy for wrapped attributes.
§Examples
let mut options = svg_format::FormatOptions::default();
options.attribute_layout = svg_format::AttributeLayout::MultiLine;
options.wrapped_attribute_indent = svg_format::WrappedAttributeIndent::OneLevel;
let formatted = svg_format::format_with_options(r#"<svg><rect x="1" y="2"/></svg>"#, options);
assert!(formatted.contains("\n x="));Variants§
OneLevel
Add one normal indentation unit.
AlignToTagName
Align to the column after <tag so wrapped attributes line up visually.
Trait Implementations§
Source§impl Clone for WrappedAttributeIndent
impl Clone for WrappedAttributeIndent
Source§fn clone(&self) -> WrappedAttributeIndent
fn clone(&self) -> WrappedAttributeIndent
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 WrappedAttributeIndent
Source§impl Debug for WrappedAttributeIndent
impl Debug for WrappedAttributeIndent
Source§impl Default for WrappedAttributeIndent
impl Default for WrappedAttributeIndent
Source§fn default() -> WrappedAttributeIndent
fn default() -> WrappedAttributeIndent
Returns the “default value” for a type. Read more
impl Eq for WrappedAttributeIndent
Source§impl PartialEq for WrappedAttributeIndent
impl PartialEq for WrappedAttributeIndent
impl StructuralPartialEq for WrappedAttributeIndent
Source§impl ValueEnum for WrappedAttributeIndent
impl ValueEnum for WrappedAttributeIndent
Auto Trait Implementations§
impl Freeze for WrappedAttributeIndent
impl RefUnwindSafe for WrappedAttributeIndent
impl Send for WrappedAttributeIndent
impl Sync for WrappedAttributeIndent
impl Unpin for WrappedAttributeIndent
impl UnsafeUnpin for WrappedAttributeIndent
impl UnwindSafe for WrappedAttributeIndent
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