#[non_exhaustive]
pub enum MoshError {
DecodingError(String),
EncodingError(String),
IoError(String),
OutOfMemory,
UnsupportedColorType,
}Expand description
It handles internal, I/O and formatter errors
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
DecodingError(String)
Data format is not supported.
EncodingError(String)
i.e. wrong data size/formatter failure.
IoError(String)
I/O errors.
OutOfMemory
Allocation failed.
UnsupportedColorType
Unsupported color type.
Trait Implementations§
source§impl Error for MoshError
impl Error for MoshError
1.30.0 · source§fn 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 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<DecodingError> for MoshError
impl From<DecodingError> for MoshError
source§fn from(e: DecodingError) -> Self
fn from(e: DecodingError) -> Self
Converts to this type from the input type.
source§impl From<EncodingError> for MoshError
impl From<EncodingError> for MoshError
source§fn from(e: EncodingError) -> Self
fn from(e: EncodingError) -> Self
Converts to this type from the input type.