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

pub enum Constant {
Show 13 variants 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>>),
}
Expand description

Represents a SPIR-V constant.

Variants

Bool(bool)

Tuple Fields of Bool

0: bool
Int(i32)

Tuple Fields of Int

0: i32
UInt(u32)

Tuple Fields of UInt

0: u32
Float(f32)

Tuple Fields of Float

0: f32
Composite(Vec<Token<Constant>>)

Tuple Fields of Composite

0: Vec<Token<Constant>>
Null
Sampler

Fields of Sampler

addressing_mode: SamplerAddressingModenormalized: boolfilter_mode: SamplerFilterMode
SpecBool(bool)

Tuple Fields of SpecBool

0: bool
SpecInt(i32)

Tuple Fields of SpecInt

0: i32
SpecUInt(u32)

Tuple Fields of SpecUInt

0: u32
SpecFloat(f32)

Tuple Fields of SpecFloat

0: f32
SpecComposite(Vec<Token<Constant>>)

Tuple Fields of SpecComposite

0: Vec<Token<Constant>>
SpecOp(OpVec<Token<Constant>>)

Tuple Fields of SpecOp

0: Op1: Vec<Token<Constant>>

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.