pub struct GenieCode { /* private fields */ }Expand description
A decoded Game Genie code: an address in $8000-$FFFF, a substitute data
byte, and an optional compare byte (present only for 8-character codes).
Implementations§
Source§impl GenieCode
impl GenieCode
Sourcepub fn new(code: &str) -> Result<Self, GenieError>
pub fn new(code: &str) -> Result<Self, GenieError>
Decode a 6- or 8-character Game Genie code.
The input is case-insensitive; code returns the
canonical upper-case form.
§Errors
Returns GenieError::InvalidLength if the code is not 6 or 8
characters, or GenieError::InvalidCharacter if it contains a
letter outside the Game Genie alphabet.
Trait Implementations§
impl Eq for GenieCode
impl StructuralPartialEq for GenieCode
Auto Trait Implementations§
impl Freeze for GenieCode
impl RefUnwindSafe for GenieCode
impl Send for GenieCode
impl Sync for GenieCode
impl Unpin for GenieCode
impl UnsafeUnpin for GenieCode
impl UnwindSafe for GenieCode
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