Enum wgpu::core::naga::SwizzleComponent
source · #[repr(u8)]pub enum SwizzleComponent {
X = 0,
Y = 1,
Z = 2,
W = 3,
}
Available on
wgpu_core
only.Expand description
Component selection for a vector swizzle.
Variants§
Implementations§
source§impl SwizzleComponent
impl SwizzleComponent
pub const XYZW: [SwizzleComponent; 4] = _
pub const fn index(&self) -> u32
pub const fn from_index(idx: u32) -> SwizzleComponent
Trait Implementations§
source§impl<'arbitrary> Arbitrary<'arbitrary> for SwizzleComponent
impl<'arbitrary> Arbitrary<'arbitrary> for SwizzleComponent
source§fn arbitrary(
u: &mut Unstructured<'arbitrary>
) -> Result<SwizzleComponent, Error>
fn arbitrary( u: &mut Unstructured<'arbitrary> ) -> Result<SwizzleComponent, Error>
Generate an arbitrary value of
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(
u: Unstructured<'arbitrary>
) -> Result<SwizzleComponent, Error>
fn arbitrary_take_rest( u: Unstructured<'arbitrary> ) -> Result<SwizzleComponent, Error>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moresource§impl Clone for SwizzleComponent
impl Clone for SwizzleComponent
source§fn clone(&self) -> SwizzleComponent
fn clone(&self) -> SwizzleComponent
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 SwizzleComponent
impl Debug for SwizzleComponent
source§impl<'de> Deserialize<'de> for SwizzleComponent
impl<'de> Deserialize<'de> for SwizzleComponent
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<SwizzleComponent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<SwizzleComponent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for SwizzleComponent
impl PartialEq for SwizzleComponent
source§fn eq(&self, other: &SwizzleComponent) -> bool
fn eq(&self, other: &SwizzleComponent) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for SwizzleComponent
impl PartialOrd for SwizzleComponent
source§fn partial_cmp(&self, other: &SwizzleComponent) -> Option<Ordering>
fn partial_cmp(&self, other: &SwizzleComponent) -> 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 SwizzleComponent
impl Serialize for SwizzleComponent
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for SwizzleComponent
impl StructuralPartialEq for SwizzleComponent
Auto Trait Implementations§
impl RefUnwindSafe for SwizzleComponent
impl Send for SwizzleComponent
impl Sync for SwizzleComponent
impl Unpin for SwizzleComponent
impl UnwindSafe for SwizzleComponent
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