[][src]Enum rspirv::sr::Constant

pub enum Constant {
    Bool(bool),
    Int(i32),
    UInt(u32),
    Float(f32),
    Composite(Vec<Token<Constant>>),
    Null,
    Sampler {
        addressing_mode: SamplerAddressingMode,
        normalized: bool,
        filter_mode: SamplerFilterMode,
    },
    SpecBool(bool),
    SpecInt(i32),
    SpecUInt(u32),
    SpecFloat(f32),
    SpecComposite(Vec<Token<Constant>>),
    SpecOp(OpVec<Token<Constant>>),
}

Represents a SPIR-V constant.

Variants

Bool(bool)
Int(i32)
UInt(u32)
Float(f32)
Composite(Vec<Token<Constant>>)
Null
Sampler

Fields of Sampler

addressing_mode: SamplerAddressingModenormalized: boolfilter_mode: SamplerFilterMode
SpecBool(bool)
SpecInt(i32)
SpecUInt(u32)
SpecFloat(f32)
SpecComposite(Vec<Token<Constant>>)
SpecOp(OpVec<Token<Constant>>)

Methods

impl Constant[src]

pub fn is_bool_constant(&self) -> bool[src]

pub fn is_int_constant(&self) -> bool[src]

pub fn is_uint_constant(&self) -> bool[src]

pub fn is_float_constant(&self) -> bool[src]

pub fn is_composite_constant(&self) -> bool[src]

pub fn is_null_constant(&self) -> bool[src]

pub fn is_sampler_constant(&self) -> bool[src]

pub fn is_spec_constant(&self) -> bool[src]

pub fn is_spec_op_constant(&self) -> bool[src]

Trait Implementations

impl Clone for Constant[src]

impl Debug for Constant[src]

impl PartialEq<Constant> for Constant[src]

impl StructuralPartialEq for Constant[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.