pub enum GhostError {
DataLengthTooShort,
HeaderError(HeaderError),
MiiError(MiiError),
InputDataError(InputDataError),
CTGPFooterError(CTGPFooterError),
ByteHandlerError(ByteHandlerError),
TryFromSliceError(TryFromSliceError),
IOError(Error),
}Expand description
Errors that can occur while parsing or modifying a Ghost.
Variants§
DataLengthTooShort
The input data is shorter than the minimum valid ghost size (0x8E bytes).
HeaderError(HeaderError)
The RKG file header could not be parsed.
MiiError(MiiError)
The embedded Mii data could not be parsed.
InputDataError(InputDataError)
The ghost input data could not be parsed.
The CTGP footer could not be parsed.
ByteHandlerError(ByteHandlerError)
A ByteHandler(byte_handler::ByteHandler) operation failed.
TryFromSliceError(TryFromSliceError)
A slice-to-array conversion failed (e.g. when extracting a CRC-32 word).
IOError(Error)
A file I/O operation failed.
Trait Implementations§
Source§impl Debug for GhostError
impl Debug for GhostError
Source§impl Display for GhostError
impl Display for GhostError
Source§impl Error for GhostError
impl Error for GhostError
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<ByteHandlerError> for GhostError
impl From<ByteHandlerError> for GhostError
Source§fn from(source: ByteHandlerError) -> Self
fn from(source: ByteHandlerError) -> Self
Converts to this type from the input type.
Source§fn from(source: CTGPFooterError) -> Self
fn from(source: CTGPFooterError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for GhostError
impl From<Error> for GhostError
Source§impl From<HeaderError> for GhostError
impl From<HeaderError> for GhostError
Source§fn from(source: HeaderError) -> Self
fn from(source: HeaderError) -> Self
Converts to this type from the input type.
Source§impl From<InputDataError> for GhostError
impl From<InputDataError> for GhostError
Source§fn from(source: InputDataError) -> Self
fn from(source: InputDataError) -> Self
Converts to this type from the input type.
Source§impl From<MiiError> for GhostError
impl From<MiiError> for GhostError
Source§impl From<TryFromSliceError> for GhostError
impl From<TryFromSliceError> for GhostError
Source§fn from(source: TryFromSliceError) -> Self
fn from(source: TryFromSliceError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for GhostError
impl !RefUnwindSafe for GhostError
impl Send for GhostError
impl Sync for GhostError
impl Unpin for GhostError
impl UnsafeUnpin for GhostError
impl !UnwindSafe for GhostError
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