Struct spirt::spv::spec::InstructionDef
source · 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 OperandKind
s, 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<InstructionDef> for InstructionDef
impl PartialEq<InstructionDef> for InstructionDef
source§fn eq(&self, other: &InstructionDef) -> bool
fn eq(&self, other: &InstructionDef) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for InstructionDef
impl StructuralEq for InstructionDef
impl StructuralPartialEq for InstructionDef
Auto Trait Implementations§
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 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.