[][src]Enum rsvg_internals::LoadingError

pub enum LoadingError {
    NoDataPassedToParser,
    XmlParseError(String),
    CouldNotCreateXmlParser,
    BadUrl,
    BadDataUrl,
    BadStylesheet,
    BadCss,
    Cairo(Status),
    EmptyData,
    SvgHasNoElements,
    RootElementIsNotSvg,
    Glib(Error),
    Unknown,
}

Errors that can happen while loading an SVG document.

All of these codes are for unrecoverable errors that keep an SVG document from being fully loaded and parsed. Note that SVG is very lenient with respect to document structure and the syntax of CSS property values; most errors there will not lead to a LoadingError. To see those errors, you may want to set the RSVG_LOG=1 environment variable.

I/O errors get reported in the Glib variant, since librsvg uses GIO internally for all input/output.

Variants

NoDataPassedToParser
XmlParseError(String)

XML syntax error.

CouldNotCreateXmlParser
BadUrl

A malformed or disallowed URL was used.

BadDataUrl

A data: URL could not be decoded.

BadStylesheet
BadCss

An invalid stylesheet was used.

Cairo(Status)

A Cairo error happened during loading.

EmptyData
SvgHasNoElements

There are no SVG elements in the document.

RootElementIsNotSvg

The outermost element in the document is not <svg>.

Glib(Error)

Generally an I/O error, or another error from GIO.

Unknown

Trait Implementations

impl Clone for LoadingError[src]

impl Debug for LoadingError[src]

impl Display for LoadingError[src]

impl Error for LoadingError[src]

impl From<Error> for LoadingError[src]

impl From<Status> for LoadingError[src]

Auto Trait Implementations

impl RefUnwindSafe for LoadingError

impl Send for LoadingError

impl Sync for LoadingError

impl Unpin for LoadingError

impl UnwindSafe for LoadingError

Blanket Implementations

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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<V, T> VZip<V> for T where
    V: MultiLane<T>,