[][src]Struct svgdom::WriteOptions

pub struct WriteOptions {
    pub use_single_quote: bool,
    pub indent: Indent,
    pub attributes_indent: Indent,
    pub attributes_order: AttributesOrder,
    pub values: ValueWriteOptions,
}

Options that defines SVG writing.

Fields

use_single_quote: bool

Use single quote marks instead of double quote.

Examples

Before:

<rect fill="red"/>

After:

<rect fill='red'/>

Default: disabled

indent: Indent

Set XML nodes indention.

Examples

Indent::None

Before:

<svg>
    <rect fill="red"/>
</svg>

After:

<svg><rect fill="red"/></svg>

Default: 4 spaces

attributes_indent: Indent

Set XML attributes indention.

Examples

Indent::Spaces(2)

Before:

<svg>
    <rect fill="red" stroke="black"/>
</svg>

After:

<svg>
    <rect
      fill="red"
      stroke="black"/>
</svg>

Default: None

attributes_order: AttributesOrder

Set attributes order.

Default: AttributesOrder::Alphabetical

values: ValueWriteOptions

svgtypes options.

Trait Implementations

impl Default for WriteOptions[src]

impl Debug for WriteOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]