[][src]Struct rspirv::dr::ModuleHeader

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: Wordversion: Wordgenerator: Wordbound: Wordreserved_word: Word

Implementations

impl ModuleHeader[src]

pub fn new(bound: Word) -> ModuleHeader[src]

Creates a new ModuleHeader instance.

pub fn set_version(&mut self, major: u8, minor: u8)[src]

Sets the SPIR-V version to the given major.minor version.

pub fn version(&self) -> (u8, u8)[src]

Returns the major and minor version numbers as a tuple.

pub fn generator(&self) -> (&str, u16)[src]

Returns the generator's name and version as a tuple.

Trait Implementations

impl Assemble for ModuleHeader[src]

impl Clone for ModuleHeader[src]

impl Debug for ModuleHeader[src]

impl Disassemble for ModuleHeader[src]

impl PartialEq<ModuleHeader> for ModuleHeader[src]

impl StructuralPartialEq for ModuleHeader[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.