pub enum Constant<'a> {
Bool(bool),
Constant(Literal),
Composite {
ty: Id,
constituents: &'a [Id],
},
Sampler {
addressing_mode: SamplerAddressingMode,
is_normalized: bool,
filter_mode: SamplerFilterMode,
},
Null {
ty: Id,
},
SpecBool(bool),
SpecConstant(Literal),
SpecConstantComposite {
ty: Id,
constituents: &'a [Id],
},
SpecConstantOp {
ty: Id,
opcode: Code,
operands: &'a [Id],
},
}Expand description
Represents an constant value.
Variants§
Bool(bool)
A non-specialization constant boolean.
Constant(Literal)
A non-specialization constant.
Composite
A non-specialization constant composite.
Fields
Sampler
A constant sampler.
Fields
§
addressing_mode: SamplerAddressingModeThe addressing mode of the sampler.
§
filter_mode: SamplerFilterModeThe filter mode of the sampler.
Null
A null value.
SpecBool(bool)
A specialization constant boolean.
SpecConstant(Literal)
A specialization constant.
SpecConstantComposite
A specialization constant composite.
Fields
SpecConstantOp
A specialization constant operation.
Trait Implementations§
impl<'a> Copy for Constant<'a>
Auto Trait Implementations§
impl<'a> Freeze for Constant<'a>
impl<'a> RefUnwindSafe for Constant<'a>
impl<'a> Send for Constant<'a>
impl<'a> Sync for Constant<'a>
impl<'a> Unpin for Constant<'a>
impl<'a> UnsafeUnpin for Constant<'a>
impl<'a> UnwindSafe for Constant<'a>
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