pub struct InstructionTable<Op: Into<Word> + Clone + Copy + Eq + 'static>(/* private fields */);Expand description
The table for all SPIR-V core instructions.
This table is static data stored in the library.
Implementations§
Source§impl<Op: Into<Word> + Clone + Copy + Eq> InstructionTable<Op>
impl<Op: Into<Word> + Clone + Copy + Eq> InstructionTable<Op>
Sourcepub fn lookup_opcode(
&self,
opcode: Word,
) -> Option<&'static BaseInstruction<'static, Op>>
pub fn lookup_opcode( &self, opcode: Word, ) -> Option<&'static BaseInstruction<'static, Op>>
Looks up the given opcode in the instruction table and returns
a reference to the instruction grammar entry if found.
Sourcepub fn get(&self, opcode: Op) -> &'static BaseInstruction<'static, Op>
pub fn get(&self, opcode: Op) -> &'static BaseInstruction<'static, Op>
Returns a reference to the instruction grammar entry with the given
opcode.
pub fn iter( &self, ) -> impl Iterator<Item = &'static BaseInstruction<'static, Op>>
Auto Trait Implementations§
impl<Op> Freeze for InstructionTable<Op>
impl<Op> RefUnwindSafe for InstructionTable<Op>where
Op: RefUnwindSafe,
impl<Op> Send for InstructionTable<Op>
impl<Op> Sync for InstructionTable<Op>where
Op: Sync,
impl<Op> Unpin for InstructionTable<Op>where
Op: Unpin,
impl<Op> UnsafeUnpin for InstructionTable<Op>
impl<Op> UnwindSafe for InstructionTable<Op>where
Op: UnwindSafe + RefUnwindSafe,
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