Enum svgdom::ErrorKind
[−]
pub enum ErrorKind { Msg(String), Xml(ErrorKind), ElementMustHaveAnId, ElementCrosslink, NoSvgElement, EmptyDocument, UnsupportedCSS(ErrorPos), InvalidCSS(ErrorPos), UnsupportedEntity(ErrorPos), UnsupportedPaintFallback(String), BrokenFuncIri(String), InvalidEncoding, MissingAttribute(String, String), CssError(Error), // some variants omitted }
The kind of an error.
Variants
Msg(String)
A convenient variant for String.
Xml(ErrorKind)
svgparser errors
ElementMustHaveAnId
If you want to use referenced element inside link attribute, such element must have a non-empty ID.
ElementCrosslink
Linked nodes can't reference each other or itself.
Examples
<linearGradient id="lg1" xlink:href="#lg2"/>
<linearGradient id="lg2" xlink:href="#lg1"/>
or
<linearGradient id="lg1" xlink:href="#lg1"/>
NoSvgElement
Parsed document must have an svg
element.
EmptyDocument
Parsed document must have at least one node.
UnsupportedCSS(ErrorPos)
libsvgdom didn't support most of the CSS2 spec.
InvalidCSS(ErrorPos)
Error during parsing of the CSS2.
UnsupportedEntity(ErrorPos)
ENTITY with XML Element data is not supported.
UnsupportedPaintFallback(String)
We don't support a <paint> type with a fallback value and a valid FuncIRI.
Examples
<linearGradient id="lg1"/>
<rect fill="url(#lg1) red"/>
BrokenFuncIri(String)
We don't support use
elements with a broken filter attribute.
InvalidEncoding
UTF-8 processing error.
MissingAttribute(String, String)
Failed to find an attribute, which must be set, during post-processing.
CssError(Error)
simplecss errors.
Methods
impl ErrorKind
fn description(&self) -> &str
A string describing the error kind.
Trait Implementations
impl Debug for ErrorKind
impl Display for ErrorKind
impl From<ErrorKind> for ErrorKind
svgparser errors