Enum naga::TypeInner[][src]

pub enum TypeInner {
    Scalar {
        kind: ScalarKind,
        width: Bytes,
    },
    Vector {
        size: VectorSize,
        kind: ScalarKind,
        width: Bytes,
    },
    Matrix {
        columns: VectorSize,
        rows: VectorSize,
        width: Bytes,
    },
    Pointer {
        base: Handle<Type>,
        class: StorageClass,
    },
    ValuePointer {
        size: Option<VectorSize>,
        kind: ScalarKind,
        width: Bytes,
        class: StorageClass,
    },
    Array {
        base: Handle<Type>,
        size: ArraySize,
        stride: u32,
    },
    Struct {
        level: StructLevel,
        members: Vec<StructMember>,
        span: u32,
    },
    Image {
        dim: ImageDimension,
        arrayed: bool,
        class: ImageClass,
    },
    Sampler {
        comparison: bool,
    },
}
Expand description

Enum with additional information, depending on the kind of type.

Variants

Scalar

Number of integral or floating-point kind.

Show fields

Fields of Scalar

kind: ScalarKindwidth: Bytes
Vector

Vector of numbers.

Show fields

Fields of Vector

size: VectorSizekind: ScalarKindwidth: Bytes
Matrix

Matrix of floats.

Show fields

Fields of Matrix

columns: VectorSizerows: VectorSizewidth: Bytes
Pointer

Pointer to another type.

Show fields

Fields of Pointer

base: Handle<Type>class: StorageClass
ValuePointer

Pointer to a value.

Show fields

Fields of ValuePointer

size: Option<VectorSize>kind: ScalarKindwidth: Bytesclass: StorageClass
Array

Homogenous list of elements.

Show fields

Fields of Array

base: Handle<Type>size: ArraySizestride: u32
Struct

User-defined structure.

Show fields

Fields of Struct

level: StructLevelmembers: Vec<StructMember>span: u32
Image

Possibly multidimensional array of texels.

Show fields

Fields of Image

dim: ImageDimensionarrayed: boolclass: ImageClass
Sampler

Can be used to sample values from images.

Show fields

Fields of Sampler

comparison: bool

Implementations

impl TypeInner[src]

pub fn scalar_kind(&self) -> Option<ScalarKind>[src]

pub fn span(&self, constants: &Arena<Constant>) -> u32[src]

Trait Implementations

impl Debug for TypeInner[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'de> Deserialize<'de> for TypeInner[src]

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
    __D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl PartialEq<TypeInner> for TypeInner[src]

fn eq(&self, other: &TypeInner) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &TypeInner) -> bool[src]

This method tests for !=.

impl Serialize for TypeInner[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl StructuralPartialEq for TypeInner[src]

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]