pub struct Opcode(/* private fields */);
Implementations§
source§impl Opcode
impl Opcode
sourcepub fn try_from_u16_with_name_and_def(
opcode: u16
) -> Option<(Self, &'static str, &'static InstructionDef)>
pub fn try_from_u16_with_name_and_def( opcode: u16 ) -> Option<(Self, &'static str, &'static InstructionDef)>
Lookup the name & definition for opcode
in the lazily-loaded Spec
,
returning None
if it’s not a known opcode.
pub fn as_u16(self) -> u16
sourcepub fn name_and_def(self) -> (&'static str, &'static InstructionDef)
pub fn name_and_def(self) -> (&'static str, &'static InstructionDef)
Lookup the name & definition for this opcode in the lazily-loaded Spec
.
sourcepub fn def(self) -> &'static InstructionDef
pub fn def(self) -> &'static InstructionDef
Lookup the definition for this opcode in the lazily-loaded Spec
.
Trait Implementations§
source§impl Ord for Opcode
impl Ord for Opcode
source§impl PartialEq<Opcode> for Opcode
impl PartialEq<Opcode> for Opcode
source§impl PartialOrd<Opcode> for Opcode
impl PartialOrd<Opcode> for Opcode
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Opcode
impl Eq for Opcode
impl StructuralEq for Opcode
impl StructuralPartialEq for Opcode
Auto Trait Implementations§
impl RefUnwindSafe for Opcode
impl Send for Opcode
impl Sync for Opcode
impl Unpin for Opcode
impl UnwindSafe for Opcode
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.