pub enum LoadError {
NoImageLoaders,
NotSupported,
FormatNotSupported {
detected_format: Option<String>,
},
NoMatchingBytesLoader,
NoMatchingImageLoader {
detected_format: Option<String>,
},
NoMatchingTextureLoader,
Loading(String),
}Expand description
Represents a failed attempt at loading an image.
Variants§
NoImageLoaders
Programmer error: There are no image loaders installed.
NotSupported
A specific loader does not support this scheme or protocol.
FormatNotSupported
A specific loader does not support the format of the image.
NoMatchingBytesLoader
Programmer error: Failed to find the bytes for this image because
there was no BytesLoader supporting the scheme.
NoMatchingImageLoader
Programmer error: Failed to parse the bytes as an image because
there was no ImageLoader supporting the format.
NoMatchingTextureLoader
Programmer error: no matching TextureLoader.
Because of the DefaultTextureLoader, this error should never happen.
Loading(String)
Runtime error: Loading was attempted, but failed (e.g. “File not found”).
Implementations§
Trait Implementations§
Source§impl Error for LoadError
impl Error for LoadError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for LoadError
impl RefUnwindSafe for LoadError
impl Send for LoadError
impl Sync for LoadError
impl Unpin for LoadError
impl UnsafeUnpin for LoadError
impl UnwindSafe for LoadError
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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