Enum naga::ScalarKind
source · [−]#[repr(u8)]
pub enum ScalarKind {
Sint,
Uint,
Float,
Bool,
}
Expand description
Primitive type for a scalar.
Variants
Sint
Signed integer type.
Uint
Unsigned integer type.
Float
Floating point type.
Bool
Boolean type.
Implementations
sourceimpl ScalarKind
impl ScalarKind
pub const fn is_numeric(self) -> bool
Trait Implementations
sourceimpl<'arbitrary> Arbitrary<'arbitrary> for ScalarKind
impl<'arbitrary> Arbitrary<'arbitrary> for ScalarKind
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 more
sourcefn 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 more
sourceimpl Clone for ScalarKind
impl Clone for ScalarKind
sourcefn clone(&self) -> ScalarKind
fn clone(&self) -> ScalarKind
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 more
sourceimpl Debug for ScalarKind
impl Debug for ScalarKind
sourceimpl<'de> Deserialize<'de> for ScalarKind
impl<'de> Deserialize<'de> for ScalarKind
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 From<StorageFormat> for ScalarKind
impl From<StorageFormat> for ScalarKind
sourcefn from(format: StorageFormat) -> Self
fn from(format: StorageFormat) -> Self
Converts to this type from the input type.
sourceimpl Hash for ScalarKind
impl Hash for ScalarKind
sourceimpl Ord for ScalarKind
impl Ord for ScalarKind
sourceimpl PartialEq<ScalarKind> for ScalarKind
impl PartialEq<ScalarKind> for ScalarKind
sourceimpl PartialOrd<ScalarKind> for ScalarKind
impl PartialOrd<ScalarKind> for ScalarKind
sourcefn partial_cmp(&self, other: &ScalarKind) -> Option<Ordering>
fn partial_cmp(&self, other: &ScalarKind) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
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 more
sourceimpl Serialize for ScalarKind
impl Serialize for ScalarKind
impl Copy for ScalarKind
impl Eq for ScalarKind
impl StructuralEq for ScalarKind
impl StructuralPartialEq for ScalarKind
Auto Trait Implementations
impl RefUnwindSafe for ScalarKind
impl Send for ScalarKind
impl Sync for ScalarKind
impl Unpin for ScalarKind
impl UnwindSafe for ScalarKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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 Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
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.