pub enum MoshError {
DecodingError(String),
EncodingError(String),
InvalidParameters,
IoError(String),
OutOfMemory,
UnsupportedColorType,
}Expand description
It handles internal, I/O and formatter errors
Variants
DecodingError(String)
Data format is not supported.
EncodingError(String)
i.e. wrong data size/formatter failure.
InvalidParameters
e.g. image_info.width can’t be 0.
IoError(String)
I/O errors.
OutOfMemory
Allocation failed.
UnsupportedColorType
Unsupported color type.
Trait Implementations
sourceimpl Error for MoshError
impl Error for MoshError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl From<DecodingError> for MoshError
impl From<DecodingError> for MoshError
sourcefn from(e: DecodingError) -> Self
fn from(e: DecodingError) -> Self
Converts to this type from the input type.
sourceimpl From<EncodingError> for MoshError
impl From<EncodingError> for MoshError
sourcefn from(e: EncodingError) -> Self
fn from(e: EncodingError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for MoshError
impl Send for MoshError
impl Sync for MoshError
impl Unpin for MoshError
impl UnwindSafe for MoshError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more