pub enum RomAnalyzerError {
UnsupportedFormat(String),
DataTooSmall {
file_size: usize,
required_size: usize,
details: String,
},
InvalidHeader(String),
ParsingError(String),
ChecksumMismatch(String),
ArchiveError(String),
IoError(Error),
ZipError(ZipError),
ChdError(Error),
FileNotFound(String),
Generic(String),
WithPath(String, Box<RomAnalyzerError>),
}Variants§
UnsupportedFormat(String)
File format or extension is not supported
DataTooSmall
ROM data is too small for analysis
InvalidHeader(String)
Header data is invalid or corrupted
ParsingError(String)
Reserved for future parsing error handling
ChecksumMismatch(String)
Checksum validation failed
ArchiveError(String)
Error processing archive files (ZIP, CHD, etc.)
IoError(Error)
I/O operation failed
ZipError(ZipError)
ZIP archive operation failed
ChdError(Error)
CHD archive operation failed
FileNotFound(String)
File not found
Generic(String)
Generic error with custom message
WithPath(String, Box<RomAnalyzerError>)
Error with associated file path for better context
Implementations§
Source§impl RomAnalyzerError
impl RomAnalyzerError
Sourcepub fn new(msg: &str) -> RomAnalyzerError
pub fn new(msg: &str) -> RomAnalyzerError
Creates a new generic RomAnalyzerError with the given message.
§Arguments
msg- A string slice that describes the error.
§Returns
A new RomAnalyzerError::Generic instance.
Trait Implementations§
Source§impl Debug for RomAnalyzerError
impl Debug for RomAnalyzerError
Source§impl Display for RomAnalyzerError
impl Display for RomAnalyzerError
Source§impl Error for RomAnalyzerError
impl Error for RomAnalyzerError
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§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Box<dyn Error>> for RomAnalyzerError
Converts a Box<dyn Error> into a RomAnalyzerError.
impl From<Box<dyn Error>> for RomAnalyzerError
Converts a Box<dyn Error> into a RomAnalyzerError.
Source§impl From<Error> for RomAnalyzerError
Converts a std::io::Error into a RomAnalyzerError.
impl From<Error> for RomAnalyzerError
Converts a std::io::Error into a RomAnalyzerError.
Source§fn from(err: Error) -> RomAnalyzerError
fn from(err: Error) -> RomAnalyzerError
Converts to this type from the input type.
Source§impl From<ZipError> for RomAnalyzerError
Converts a zip::result::ZipError into a RomAnalyzerError.
impl From<ZipError> for RomAnalyzerError
Converts a zip::result::ZipError into a RomAnalyzerError.
Source§fn from(err: ZipError) -> RomAnalyzerError
fn from(err: ZipError) -> RomAnalyzerError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RomAnalyzerError
impl !RefUnwindSafe for RomAnalyzerError
impl Send for RomAnalyzerError
impl Sync for RomAnalyzerError
impl Unpin for RomAnalyzerError
impl !UnwindSafe for RomAnalyzerError
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more