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 PartialOrd for Opcode
impl PartialOrd for Opcode
impl Copy for Opcode
impl Eq for Opcode
impl StructuralPartialEq for Opcode
Auto Trait Implementations§
impl Freeze for Opcode
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more