pub enum Error {
BadSanity(u32),
UnsupportedVersion(u32),
BadSection(&'static str),
BadIndex(&'static str, i64),
Binary(String),
NotFound(String),
Hao(HaoError),
Io(Error),
}Expand description
Why reading a game, its metadata or its binary failed.
Variants§
BadSanity(u32)
The file doesn’t start with IL2CPP’s metadata magic (0xFAB11BAF),
so it isn’t a global-metadata.dat (or it’s encrypted).
UnsupportedVersion(u32)
The metadata’s version has no known layout (supported: 29, 31 and 39).
BadSection(&'static str)
A section of the metadata header points outside the file, or its size isn’t a whole number of entries.
BadIndex(&'static str, i64)
An index into a metadata table (named by the first field) is out of range.
Binary(String)
The game binary couldn’t be parsed, its registration structs weren’t found, or a type in its table couldn’t be read.
NotFound(String)
Game::open couldn’t find global-metadata.dat
or GameAssembly in the game folder.
Hao(HaoError)
Building or writing a declaration assembly failed in hao.
Io(Error)
A file couldn’t be read or written.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Forget for Error
impl Freeze for Error
impl Move for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Errorwhere
&'static str: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const () is !null: UnsafeUnpin,
PhantomData<ErrorData<CustomOwner>>: UnsafeUnpin,
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