Skip to main content

InstructionTable

Struct InstructionTable 

Source
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>

Source

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.

Source

pub fn get(&self, opcode: Op) -> &'static BaseInstruction<'static, Op>

Returns a reference to the instruction grammar entry with the given opcode.

Source

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>
where Op: Send + Sync,

§

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>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.