pub enum JImageError {
Magic {
magic: [u8; 4],
context: &'static str,
},
Version {
major_version: u16,
minor_version: u16,
},
RawRead {
from: usize,
to: usize,
},
Utf8 {
source: Utf8Error,
invalid_data: Vec<u8>,
},
Io {
source: Error,
path: PathBuf,
},
Decompression {
source: Error,
},
UnsupportedDecompressor {
decompressor_name: String,
},
Internal {
value: String,
},
}Expand description
Represents errors that can occur while working with JImage files.
Variants§
Trait Implementations§
Source§impl Debug for JImageError
impl Debug for JImageError
Source§impl Display for JImageError
impl Display for JImageError
Source§impl Error for JImageError
impl Error for JImageError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§impl ErrorCompat for JImageError
impl ErrorCompat for JImageError
Source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source. Read moreSource§impl From<TryFromSliceError> for JImageError
impl From<TryFromSliceError> for JImageError
Source§fn from(value: TryFromSliceError) -> Self
fn from(value: TryFromSliceError) -> Self
Converts to this type from the input type.
Source§impl IntoError<JImageError> for DecompressionSnafu
impl IntoError<JImageError> for DecompressionSnafu
Source§fn into_error(self, error: Self::Source) -> JImageError
fn into_error(self, error: Self::Source) -> JImageError
Combine the information to produce the error
Source§impl<__T0> IntoError<JImageError> for InternalSnafu<__T0>
impl<__T0> IntoError<JImageError> for InternalSnafu<__T0>
Source§fn into_error(self, error: Self::Source) -> JImageError
fn into_error(self, error: Self::Source) -> JImageError
Combine the information to produce the error
Source§impl<__T0> IntoError<JImageError> for IoSnafu<__T0>
impl<__T0> IntoError<JImageError> for IoSnafu<__T0>
Source§fn into_error(self, error: Self::Source) -> JImageError
fn into_error(self, error: Self::Source) -> JImageError
Combine the information to produce the error
Source§impl<__T0, __T1> IntoError<JImageError> for MagicSnafu<__T0, __T1>
impl<__T0, __T1> IntoError<JImageError> for MagicSnafu<__T0, __T1>
Source§fn into_error(self, error: Self::Source) -> JImageError
fn into_error(self, error: Self::Source) -> JImageError
Combine the information to produce the error
Source§impl<__T0, __T1> IntoError<JImageError> for RawReadSnafu<__T0, __T1>
impl<__T0, __T1> IntoError<JImageError> for RawReadSnafu<__T0, __T1>
Source§fn into_error(self, error: Self::Source) -> JImageError
fn into_error(self, error: Self::Source) -> JImageError
Combine the information to produce the error
Source§impl<__T0> IntoError<JImageError> for UnsupportedDecompressorSnafu<__T0>
impl<__T0> IntoError<JImageError> for UnsupportedDecompressorSnafu<__T0>
Source§fn into_error(self, error: Self::Source) -> JImageError
fn into_error(self, error: Self::Source) -> JImageError
Combine the information to produce the error
Source§impl<__T0> IntoError<JImageError> for Utf8Snafu<__T0>
impl<__T0> IntoError<JImageError> for Utf8Snafu<__T0>
Source§fn into_error(self, error: Self::Source) -> JImageError
fn into_error(self, error: Self::Source) -> JImageError
Combine the information to produce the error
Source§impl<__T0, __T1> IntoError<JImageError> for VersionSnafu<__T0, __T1>
impl<__T0, __T1> IntoError<JImageError> for VersionSnafu<__T0, __T1>
Source§fn into_error(self, error: Self::Source) -> JImageError
fn into_error(self, error: Self::Source) -> JImageError
Combine the information to produce the error
Auto Trait Implementations§
impl Freeze for JImageError
impl !RefUnwindSafe for JImageError
impl Send for JImageError
impl Sync for JImageError
impl Unpin for JImageError
impl !UnwindSafe for JImageError
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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