Struct rspirv::dr::ModuleHeader
source · pub struct ModuleHeader {
pub magic_number: Word,
pub version: Word,
pub generator: Word,
pub bound: Word,
pub reserved_word: Word,
}
Expand description
Data representation of a SPIR-V module header.
Fields§
§magic_number: Word
§version: Word
§generator: Word
§bound: Word
§reserved_word: Word
Implementations§
source§impl ModuleHeader
impl ModuleHeader
sourcepub fn new(bound: Word) -> ModuleHeader
pub fn new(bound: Word) -> ModuleHeader
Creates a new ModuleHeader
instance.
sourcepub fn set_version(&mut self, major: u8, minor: u8)
pub fn set_version(&mut self, major: u8, minor: u8)
Sets the SPIR-V version to the given major.minor version.
Trait Implementations§
source§impl Assemble for ModuleHeader
impl Assemble for ModuleHeader
source§fn assemble_into(&self, result: &mut Vec<u32>)
fn assemble_into(&self, result: &mut Vec<u32>)
Assembles the current object into the
result
vector, reducing the need for lots of allocationssource§impl Clone for ModuleHeader
impl Clone for ModuleHeader
source§fn clone(&self) -> ModuleHeader
fn clone(&self) -> ModuleHeader
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ModuleHeader
impl Debug for ModuleHeader
source§impl Disassemble for ModuleHeader
impl Disassemble for ModuleHeader
source§fn disassemble(&self) -> String
fn disassemble(&self) -> String
Disassembles the current object and returns the assembly code.
source§impl PartialEq<ModuleHeader> for ModuleHeader
impl PartialEq<ModuleHeader> for ModuleHeader
source§fn eq(&self, other: &ModuleHeader) -> bool
fn eq(&self, other: &ModuleHeader) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ModuleHeader
Auto Trait Implementations§
impl RefUnwindSafe for ModuleHeader
impl Send for ModuleHeader
impl Sync for ModuleHeader
impl Unpin for ModuleHeader
impl UnwindSafe for ModuleHeader
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