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 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)