pub struct GenieCode { /* private fields */ }Expand description
Game Genie Code
Implementations§
Source§impl GenieCode
impl GenieCode
Sourcepub fn new(code: String) -> Result<Self>
pub fn new(code: String) -> Result<Self>
Creates a new GenieCode instance.
§Errors
This function will return an error if the given code is not the correct format.
Sourcepub fn from_raw(code: String, hex: Vec<u8>) -> Self
pub fn from_raw(code: String, hex: Vec<u8>) -> Self
Creates a new GenieCode instance from raw hex values. GenieCode may not be valid if
hex is not the correct length. Use GenieCode::parse to validate the code.
pub fn parse(code: &str) -> Result<Vec<u8>>
pub fn code(&self) -> &str
pub const fn addr(&self) -> u16
pub const fn read(&self, val: u8) -> u8
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GenieCode
impl<'de> Deserialize<'de> for GenieCode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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 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