Struct rspirv::mr::ModuleHeader [−][src]
pub struct ModuleHeader { pub magic_number: Word, pub version: Word, pub generator: Word, pub bound: Word, pub reserved_word: Word, }
Data representation of a SPIR-V module header.
Fields
magic_number: Word
version: Word
generator: Word
bound: Word
reserved_word: Word
Methods
impl ModuleHeader
[src]
impl ModuleHeader
pub fn new(bound: Word) -> ModuleHeader
[src]
pub fn new(bound: Word) -> ModuleHeader
Creates a new ModuleHeader
instance.
pub fn set_version(&mut self, major: u8, minor: u8)
[src]
pub fn set_version(&mut self, major: u8, minor: u8)
Sets the SPIR-V version to the given major.minor version.
pub fn version(&self) -> (u8, u8)
[src]
pub fn version(&self) -> (u8, u8)
Returns the major and minor version numbers as a tuple.
pub fn generator(&self) -> (&str, u16)
[src]
pub fn generator(&self) -> (&str, u16)
Returns the generator's name and version as a tuple.
Trait Implementations
impl Assemble for ModuleHeader
[src]
impl Assemble for ModuleHeader
impl Disassemble for ModuleHeader
[src]
impl Disassemble for ModuleHeader
fn disassemble(&self) -> String
[src]
fn disassemble(&self) -> String
Disassembles the current object and returns the assembly code.
impl Debug for ModuleHeader
[src]
impl Debug for ModuleHeader
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for ModuleHeader
[src]
impl PartialEq for ModuleHeader
fn eq(&self, other: &ModuleHeader) -> bool
[src]
fn eq(&self, other: &ModuleHeader) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ModuleHeader) -> bool
[src]
fn ne(&self, other: &ModuleHeader) -> bool
This method tests for !=
.
Auto Trait Implementations
impl Send for ModuleHeader
impl Send for ModuleHeader
impl Sync for ModuleHeader
impl Sync for ModuleHeader