Enum spirq::constant::ConstantValue
source · #[non_exhaustive]pub enum ConstantValue {
}
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.
Typeless(Box<[u8]>)
Bool(bool)
S8(i8)
S16(i16)
S32(i32)
S64(i64)
U8(u8)
U16(u16)
U32(u32)
U64(u64)
F16(OrderedFloat<f16>)
F32(OrderedFloat<f32>)
F64(OrderedFloat<f64>)
Implementations§
source§impl ConstantValue
impl ConstantValue
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§fn from(x: &[u32]) -> ConstantValue
fn from(x: &[u32]) -> ConstantValue
Converts to this type from the input type.
source§impl From<&[u8]> for ConstantValue
impl From<&[u8]> for ConstantValue
source§fn from(x: &[u8]) -> ConstantValue
fn from(x: &[u8]) -> ConstantValue
Converts to this type from the input type.
source§impl From<bool> for ConstantValue
impl From<bool> for ConstantValue
source§fn from(x: bool) -> ConstantValue
fn from(x: bool) -> ConstantValue
Converts to this type from the input type.
source§impl From<f32> for ConstantValue
impl From<f32> for ConstantValue
source§fn from(x: f32) -> ConstantValue
fn from(x: f32) -> ConstantValue
Converts to this type from the input type.
source§impl From<i32> for ConstantValue
impl From<i32> for ConstantValue
source§fn from(x: i32) -> ConstantValue
fn from(x: i32) -> ConstantValue
Converts to this type from the input type.
source§impl From<u32> for ConstantValue
impl From<u32> for ConstantValue
source§fn from(x: u32) -> ConstantValue
fn from(x: u32) -> ConstantValue
Converts to this type from the input type.
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 StructuralPartialEq for ConstantValue
Auto Trait Implementations§
impl Freeze for ConstantValue
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