Enum naga::ScalarValue
source · [−]Expand description
A literal scalar value, used in constants.
Variants
Sint(i64)
Uint(u64)
Float(f64)
Bool(bool)
Implementations
sourceimpl ScalarValue
impl ScalarValue
pub const fn scalar_kind(&self) -> ScalarKind
Trait Implementations
sourceimpl<'arbitrary> Arbitrary<'arbitrary> for ScalarValue
impl<'arbitrary> Arbitrary<'arbitrary> for ScalarValue
sourcefn 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 moresourcefn 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 moresourceimpl Clone for ScalarValue
impl Clone for ScalarValue
sourcefn clone(&self) -> ScalarValue
fn clone(&self) -> ScalarValue
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for ScalarValue
impl Debug for ScalarValue
sourceimpl<'de> Deserialize<'de> for ScalarValue
impl<'de> Deserialize<'de> for ScalarValue
sourcefn 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
sourceimpl Hash for ScalarValue
impl Hash for ScalarValue
sourceimpl PartialEq<ScalarValue> for ScalarValue
impl PartialEq<ScalarValue> for ScalarValue
sourceimpl PartialOrd<ScalarValue> for ScalarValue
impl PartialOrd<ScalarValue> for ScalarValue
sourcefn partial_cmp(&self, other: &ScalarValue) -> Option<Ordering>
fn partial_cmp(&self, other: &ScalarValue) -> Option<Ordering>
1.0.0 · sourcefn 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 moresourceimpl 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<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,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.