Enum rsvg::LoadingError
source · #[non_exhaustive]pub enum LoadingError {
XmlParseError(String),
OutOfMemory(String),
BadUrl,
BadCss,
NoSvgRoot,
Io(String),
LimitExceeded(ImplementationLimit),
Other(String),
}
Expand description
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 (Non-exhaustive)§
This enum is marked as non-exhaustive
XmlParseError(String)
XML syntax error.
OutOfMemory(String)
Not enough memory to load the document.
BadUrl
A malformed or disallowed URL was used.
BadCss
An invalid stylesheet was used.
NoSvgRoot
There is no <svg>
root element in the XML.
Io(String)
I/O error.
LimitExceeded(ImplementationLimit)
A particular implementation-defined limit was exceeded.
Other(String)
Catch-all for loading errors.
Trait Implementations§
source§impl Clone for LoadingError
impl Clone for LoadingError
source§fn clone(&self) -> LoadingError
fn clone(&self) -> LoadingError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LoadingError
impl Debug for LoadingError
source§impl Display for LoadingError
impl Display for LoadingError
source§impl Error for LoadingError
impl Error for LoadingError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<Error> for LoadingError
impl From<Error> for LoadingError
source§fn from(e: Error) -> LoadingError
fn from(e: Error) -> LoadingError
Auto Trait Implementations§
impl Freeze for LoadingError
impl RefUnwindSafe for LoadingError
impl Send for LoadingError
impl Sync for LoadingError
impl Unpin for LoadingError
impl UnwindSafe for LoadingError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.