pub enum ModuleError {
IncorrectMagic(u32),
IncorrectVersion(TryFromPrimitiveError<ModuleVersion>),
NegativeBlockIndex(i32),
}
Expand description
Errors that can occur when reading a module file.
Variants§
IncorrectMagic(u32)
Incorrect magic number found in the module file header. Expected magic number is “ucsh” (0x64686F6D).
IncorrectVersion(TryFromPrimitiveError<ModuleVersion>)
Incorrect version number found in the module file header. Expected version is 53. While version 53 is the only fully supported version, other versions may also work.
NegativeBlockIndex(i32)
Invalid negative block index found in module file, indicating file corruption. This error serves as a runtime assert.
Trait Implementations§
Source§impl Debug for ModuleError
impl Debug for ModuleError
Source§impl Display for ModuleError
impl Display for ModuleError
Source§impl Error for ModuleError
impl Error for ModuleError
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()
Source§impl From<ModuleError> for Error
impl From<ModuleError> for Error
Source§fn from(source: ModuleError) -> Self
fn from(source: ModuleError) -> Self
Converts to this type from the input type.
Source§impl From<TryFromPrimitiveError<ModuleVersion>> for ModuleError
impl From<TryFromPrimitiveError<ModuleVersion>> for ModuleError
Source§fn from(source: TryFromPrimitiveError<ModuleVersion>) -> Self
fn from(source: TryFromPrimitiveError<ModuleVersion>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ModuleError
impl RefUnwindSafe for ModuleError
impl Send for ModuleError
impl Sync for ModuleError
impl Unpin for ModuleError
impl UnwindSafe for ModuleError
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