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§
Source§impl Error for SaveError
impl Error for SaveError
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()
Auto Trait Implementations§
impl Freeze for SaveError
impl !RefUnwindSafe for SaveError
impl Send for SaveError
impl Sync for SaveError
impl Unpin for SaveError
impl !UnwindSafe for SaveError
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