pub struct InstructionDef {
pub category: InstructionCategory,
pub has_result_type_id: bool,
pub has_result_id: bool,
pub req_operands: ArrayVec<PackedOperandNameAndKind, 14>,
pub opt_operands: ArrayVec<PackedOperandNameAndKind, 2>,
pub rest_operands: Option<RestOperandsUnit>,
}Fields§
§category: InstructionCategory§has_result_type_id: bool§has_result_id: bool§req_operands: ArrayVec<PackedOperandNameAndKind, 14>§opt_operands: ArrayVec<PackedOperandNameAndKind, 2>§rest_operands: Option<RestOperandsUnit>Implementations§
Source§impl InstructionDef
impl InstructionDef
Sourcepub fn all_operands(
&self,
) -> impl Iterator<Item = (OperandMode, OperandKind)> + '_
pub fn all_operands( &self, ) -> impl Iterator<Item = (OperandMode, OperandKind)> + '_
Return a (potentially infinite) iterator of OperandKinds, along with
the OperandMode indicating whether an operand is expected (Required),
or that an operand’s absence signals the end of operands (Optional),
which is also the exit signal for the “rest operands” infinite iterators.
Sourcepub fn all_operands_with_names(
&self,
) -> impl Iterator<Item = (OperandMode, PackedOperandNameAndKind)> + '_
pub fn all_operands_with_names( &self, ) -> impl Iterator<Item = (OperandMode, PackedOperandNameAndKind)> + '_
Like all_operands, but providing access to the operand names as well.
Trait Implementations§
Source§impl PartialEq for InstructionDef
impl PartialEq for InstructionDef
impl Eq for InstructionDef
impl StructuralPartialEq for InstructionDef
Auto Trait Implementations§
impl Freeze for InstructionDef
impl RefUnwindSafe for InstructionDef
impl Send for InstructionDef
impl Sync for InstructionDef
impl Unpin for InstructionDef
impl UnwindSafe for InstructionDef
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 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