pub enum AttributeLayout {
Auto,
SingleLine,
MultiLine,
}Expand description
Attribute wrapping mode.
§Examples
let mut options = svg_format::FormatOptions::default();
options.attribute_layout = svg_format::AttributeLayout::MultiLine;
let formatted = svg_format::format_with_options(r#"<svg><rect x="1" y="2"/></svg>"#, options);
assert!(formatted.contains('\n'));Variants§
Auto
Wrap only when inline width exceeds threshold (or source was already multiline).
SingleLine
Always keep attributes in one line.
MultiLine
Always wrap attributes into multiple lines (if any attributes exist).
Trait Implementations§
Source§impl Clone for AttributeLayout
impl Clone for AttributeLayout
Source§fn clone(&self) -> AttributeLayout
fn clone(&self) -> AttributeLayout
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 AttributeLayout
Source§impl Debug for AttributeLayout
impl Debug for AttributeLayout
Source§impl Default for AttributeLayout
impl Default for AttributeLayout
Source§fn default() -> AttributeLayout
fn default() -> AttributeLayout
Returns the “default value” for a type. Read more
impl Eq for AttributeLayout
Source§impl PartialEq for AttributeLayout
impl PartialEq for AttributeLayout
impl StructuralPartialEq for AttributeLayout
Source§impl ValueEnum for AttributeLayout
impl ValueEnum for AttributeLayout
Auto Trait Implementations§
impl Freeze for AttributeLayout
impl RefUnwindSafe for AttributeLayout
impl Send for AttributeLayout
impl Sync for AttributeLayout
impl Unpin for AttributeLayout
impl UnsafeUnpin for AttributeLayout
impl UnwindSafe for AttributeLayout
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