pub enum LoadErrorKind {
NotFound,
DecodeFailed(String),
Io(Error),
Cancelled,
Unsupported,
}Expand description
Typed asset load-failure category.
Replaces the previous String-typed failure surface. Renderers branch on kind (a “broken image” icon for
Self::NotFound / Self::Unsupported, an error banner for Self::DecodeFailed, silent drop for
Self::Cancelled).
Variants§
NotFound
Source file does not exist or is not reachable.
DecodeFailed(String)
The bytes were read but the decoder rejected them. Carries the decoder’s message.
Io(Error)
Underlying I/O error (permission denied, broken pipe, …). Kept around so callers can inspect kind().
Cancelled
The job was discarded because a newer SetSrc superseded it before completion.
Unsupported
File extension or content type that the asset crate does not handle.
Trait Implementations§
Source§impl Debug for LoadErrorKind
impl Debug for LoadErrorKind
Source§impl Display for LoadErrorKind
impl Display for LoadErrorKind
Source§impl From<Error> for LoadErrorKind
impl From<Error> for LoadErrorKind
Source§impl From<LoadErrorKind> for ImageLoadFailed
impl From<LoadErrorKind> for ImageLoadFailed
Source§fn from(kind: LoadErrorKind) -> Self
fn from(kind: LoadErrorKind) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LoadErrorKind
impl !RefUnwindSafe for LoadErrorKind
impl Send for LoadErrorKind
impl Sync for LoadErrorKind
impl Unpin for LoadErrorKind
impl UnsafeUnpin for LoadErrorKind
impl !UnwindSafe for LoadErrorKind
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.