pub enum Error {
RomSize {
expected: usize,
actual: usize,
},
CardSize {
actual: usize,
max: usize,
},
NoSuchPort {
port: u8,
},
UnknownModel {
name: String,
},
InvalidState {
reason: &'static str,
offset: usize,
},
StateModelMismatch,
StateRomMismatch,
KeyNotOnModel {
key: &'static str,
model: &'static str,
},
}Expand description
Something the caller handed the library was unusable.
Variants§
RomSize
The ROM image has the wrong size for the model.
CardSize
A card image is not a power of two between the minimum card size and the port’s maximum.
Fields
NoSuchPort
The model has no card port with this number.
UnknownModel
No model has this name (see Model’s FromStr).
InvalidState
A saved state could not be parsed.
Fields
StateModelMismatch
A saved state belongs to another model.
StateRomMismatch
A saved state was made with a different system ROM.
KeyNotOnModel
A key the model’s keyboard does not have (e.g. prg on the 49G).
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
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 Error
Auto Trait Implementations§
impl Forget for Error
impl Freeze for Error
impl Move for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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