Struct spirv_utils::RawModule [] [src]

pub struct RawModule {
    // some fields omitted
}

Minimal representation of a SPIR-V module.

Methods

impl RawModule

fn load_module<P: AsRef<Path>>(path: P) -> Result<RawModule>

Load a module from a file

fn read_module<R: Read>(reader: R) -> Result<RawModule>

Read a module

fn instructions<'a>(&'a self) -> &'a [Instruction]

Gets the instructions in the module

fn def_index<I: Into<Id>>(&self, id: I) -> Option<usize>

Gets the index of the instruction that defines the given id, if any

fn use_indices<'a, I: Into<Id>>(&'a self, id: I) -> Option<&'a [usize]>

Gets the indices of the instructions that use the given id

fn def<'a, I: Into<Id>>(&'a self, id: I) -> Option<&'a Instruction>

Gets the instruction that defines the given Id, if any

fn uses<'a, I: Into<Id>>(&'a self, id: I) -> Uses<'a>

Returns an iterator over the uses of the given Id