logo
pub struct Spirv { /* private fields */ }
Expand description

A parsed and analyzed SPIR-V module.

Implementations

Parses a SPIR-V document from a list of words.

Returns a reference to the instructions in the module.

Returns the SPIR-V version that the module is compiled for.

Returns the upper bound of Ids. All Ids should have a numeric value strictly less than this value.

Returns information about an Id.

Panics
  • Panics if id is not defined in this module. This can in theory only happpen if you are mixing Ids from different modules.

Returns an iterator over all Capability instructions.

Returns an iterator over all Extension instructions.

Returns an iterator over all ExtInstImport instructions.

Returns the MemoryModel instruction.

source

pub fn iter_entry_point(&self) -> impl ExactSizeIterator<Item = &Instruction>

Returns an iterator over all EntryPoint instructions.

Returns an iterator over all execution mode instructions.

Returns an iterator over all name debug instructions.

Returns an iterator over all decoration instructions.

Returns an iterator over all global declaration instructions: types, constants and global variables.

Note: This can also include Line and NoLine instructions.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.