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(Op, Vec<Token<Constant>>),
}
Expand description
Represents a SPIR-V constant.
Variants§
Bool(bool)
Int(i32)
UInt(u32)
Float(f32)
Composite(Vec<Token<Constant>>)
Null
Sampler
SpecBool(bool)
SpecInt(i32)
SpecUInt(u32)
SpecFloat(f32)
SpecComposite(Vec<Token<Constant>>)
SpecOp(Op, Vec<Token<Constant>>)
Implementations§
source§impl Constant
impl Constant
pub fn is_bool_constant(&self) -> bool
pub fn is_int_constant(&self) -> bool
pub fn is_uint_constant(&self) -> bool
pub fn is_float_constant(&self) -> bool
pub fn is_composite_constant(&self) -> bool
pub fn is_null_constant(&self) -> bool
pub fn is_sampler_constant(&self) -> bool
pub fn is_spec_constant(&self) -> bool
pub fn is_spec_op_constant(&self) -> bool
Trait Implementations§
source§impl PartialEq<Constant> for Constant
impl PartialEq<Constant> for Constant
impl StructuralPartialEq for Constant
Auto Trait Implementations§
impl RefUnwindSafe for Constant
impl Send for Constant
impl Sync for Constant
impl Unpin for Constant
impl UnwindSafe for Constant
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more