Struct svgdom::ParseOptions

source ·
pub struct ParseOptions {
    pub skip_unresolved_classes: bool,
    pub skip_invalid_attributes: bool,
    pub skip_invalid_css: bool,
}
Expand description

Options that defines SVG parsing.

Fields

skip_unresolved_classes: bool

Skip unresolved references inside the class attribute.

It’s enabled by default, but if you disable it - all unresolved classes will be kept in the class attribute.

Default: true

skip_invalid_attributes: bool

Skip attributes with invalid values.

By default, attribute with an invalid value will lead to a parsing error. This flag allows converting this error into a warning.

Default: false

skip_invalid_css: bool

Skip invalid/unsupported CSS.

By default, CSS with an invalid/unsupported value will lead to a parsing error. This flag allows converting this error into a warning.

Default: false

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.