Type Alias SvgError

Source
pub type SvgError = Error;
Expand description

Error type for parsing SVGs with usvg.

Aliased Type§

enum SvgError {
    NotAnUtf8Str,
    MalformedGZip,
    ElementsLimitReached,
    InvalidSize,
    ParsingFailed(Error),
}

Variants§

§

NotAnUtf8Str

Only UTF-8 content are supported.

§

MalformedGZip

Compressed SVG must use the GZip algorithm.

§

ElementsLimitReached

We do not allow SVG with more than 1_000_000 elements for security reasons.

§

InvalidSize

SVG doesn’t have a valid size.

Occurs when width and/or height are <= 0.

Also occurs if width, height and viewBox are not set.

§

ParsingFailed(Error)

Failed to parse an SVG data.