Enum naga::ScalarValue
source · pub enum ScalarValue {
Sint(i64),
Uint(u64),
Float(f64),
Bool(bool),
}
Expand description
A literal scalar value, used in constants.
Variants§
Implementations§
source§impl ScalarValue
impl ScalarValue
pub const fn scalar_kind(&self) -> ScalarKind
Trait Implementations§
source§impl<'arbitrary> Arbitrary<'arbitrary> for ScalarValue
impl<'arbitrary> Arbitrary<'arbitrary> for ScalarValue
source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moresource§impl Clone for ScalarValue
impl Clone for ScalarValue
source§fn clone(&self) -> ScalarValue
fn clone(&self) -> ScalarValue
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 ScalarValue
impl Debug for ScalarValue
source§impl<'de> Deserialize<'de> for ScalarValue
impl<'de> Deserialize<'de> for ScalarValue
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for ScalarValue
impl Hash for ScalarValue
source§impl PartialEq<ScalarValue> for ScalarValue
impl PartialEq<ScalarValue> for ScalarValue
source§impl PartialOrd<ScalarValue> for ScalarValue
impl PartialOrd<ScalarValue> for ScalarValue
source§fn partial_cmp(&self, other: &ScalarValue) -> Option<Ordering>
fn partial_cmp(&self, other: &ScalarValue) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ScalarValue
impl Serialize for ScalarValue
impl Copy for ScalarValue
impl Eq for ScalarValue
Auto Trait Implementations§
impl RefUnwindSafe for ScalarValue
impl Send for ScalarValue
impl Sync for ScalarValue
impl Unpin for ScalarValue
impl UnwindSafe for ScalarValue
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.