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 for ModuleHeader
impl PartialEq for ModuleHeader
impl Eq for ModuleHeader
impl StructuralPartialEq for ModuleHeader
Auto Trait Implementations§
impl Freeze for ModuleHeader
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