Enum spirq_core::constant::ConstantValue
source · #[non_exhaustive]pub enum ConstantValue {
Typeless(Box<[u8]>),
Bool(bool),
S32(i32),
U32(u32),
F32(OrderedFloat<f32>),
}Expand description
Typed constant value.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Trait Implementations§
source§impl Clone for ConstantValue
impl Clone for ConstantValue
source§fn clone(&self) -> ConstantValue
fn clone(&self) -> ConstantValue
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ConstantValue
impl Debug for ConstantValue
source§impl From<&[u32]> for ConstantValue
impl From<&[u32]> for ConstantValue
source§impl From<&[u8]> for ConstantValue
impl From<&[u8]> for ConstantValue
source§impl From<bool> for ConstantValue
impl From<bool> for ConstantValue
source§impl From<f32> for ConstantValue
impl From<f32> for ConstantValue
source§impl From<i32> for ConstantValue
impl From<i32> for ConstantValue
source§impl From<u32> for ConstantValue
impl From<u32> for ConstantValue
source§impl Hash for ConstantValue
impl Hash for ConstantValue
source§impl PartialEq for ConstantValue
impl PartialEq for ConstantValue
source§fn eq(&self, other: &ConstantValue) -> bool
fn eq(&self, other: &ConstantValue) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for ConstantValue
impl StructuralEq for ConstantValue
impl StructuralPartialEq for ConstantValue
Auto Trait Implementations§
impl RefUnwindSafe for ConstantValue
impl Send for ConstantValue
impl Sync for ConstantValue
impl Unpin for ConstantValue
impl UnwindSafe for ConstantValue
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