#[non_exhaustive]pub enum UnifError {
HeaderTruncated(usize),
BadMagic([u8; 4]),
ChunkOverrun {
id: String,
offset: usize,
len: usize,
},
NoMapr,
UnknownBoard(String),
}Expand description
Errors from parsing a UNIF container.
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.
HeaderTruncated(usize)
Shorter than the 32-byte fixed header.
BadMagic([u8; 4])
The magic prefix is not "UNIF".
ChunkOverrun
A chunk’s declared length runs past the end of the file.
Fields
NoMapr
No MAPR board-name chunk was present.
UnknownBoard(String)
The MAPR board name does not resolve to a known iNES mapper.
Trait Implementations§
impl Eq for UnifError
Source§impl Error for UnifError
impl Error for UnifError
1.30.0 · 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()
impl StructuralPartialEq for UnifError
Auto Trait Implementations§
impl Freeze for UnifError
impl RefUnwindSafe for UnifError
impl Send for UnifError
impl Sync for UnifError
impl Unpin for UnifError
impl UnsafeUnpin for UnifError
impl UnwindSafe for UnifError
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