pub enum SaveError {
SaveStateError(Error),
InvalidSaveStateHeader,
UnmatchedSaveErrorVersion(usize),
InvalidCartridgeHash,
}
Expand description
An error that may occur while saving/loading GameBoy state.
Variants
SaveStateError(Error)
An error happend while serializing or deserializing one of the objects in the save state stream.
InvalidSaveStateHeader
The provided stream/file does not have a valid save state header.
UnmatchedSaveErrorVersion(usize)
The save state version mismatches the version supported/compatible with by this version of the emulator.
Check SAVE_STATE_VERSION
for the current version.
InvalidCartridgeHash
The save state stream/file provided is not for the currently running cartridge.
Trait Implementations
sourceimpl Error for SaveError
impl Error for SaveError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
🔬 This is a nightly-only experimental API. (
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn 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 SaveError
impl Send for SaveError
impl Sync for SaveError
impl Unpin for SaveError
impl !UnwindSafe for SaveError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more