pub struct Module { /* private fields */ }Expand description
A decoded SPIR-V module.
Implementations§
Source§impl Module
impl Module
Sourcepub fn parse(words: &[u32]) -> Result<Self, ParseError>
pub fn parse(words: &[u32]) -> Result<Self, ParseError>
Decode a binary module.
Sourcepub fn to_words(&self) -> Vec<u32>
pub fn to_words(&self) -> Vec<u32>
Encode back to words. For a module produced by a standard compiler this reproduces the input exactly; the corpus test checks that over every module it is given.
Sourcepub fn as_rspirv(&self) -> &Module
pub fn as_rspirv(&self) -> &Module
The underlying rspirv model, for callers that need the full instruction stream.
Sourcepub fn capabilities(&self) -> Vec<Capability>
pub fn capabilities(&self) -> Vec<Capability>
The declared capabilities, in declaration order.
Sourcepub fn entry_points(&self) -> Vec<EntryPoint>
pub fn entry_points(&self) -> Vec<EntryPoint>
Every entry point, with its LocalSize when declared as a literal.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Module
impl Freeze for Module
impl Move for Module
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnsafeUnpin for Module
impl UnwindSafe for Module
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