Struct nannou::wgpu::ColorWrite [−]
#[repr(transparent)]pub struct ColorWrite { /* fields omitted */ }
Expand description
Color write mask. Disabled color channels will not be written to.
Implementations
impl ColorWrite
impl ColorWrite
pub const RED: ColorWrite
pub const RED: ColorWrite
Enable red channel writes
pub const GREEN: ColorWrite
pub const GREEN: ColorWrite
Enable green channel writes
pub const BLUE: ColorWrite
pub const BLUE: ColorWrite
Enable blue channel writes
pub const ALPHA: ColorWrite
pub const ALPHA: ColorWrite
Enable alpha channel writes
pub const COLOR: ColorWrite
pub const COLOR: ColorWrite
Enable red, green, and blue channel writes
pub const ALL: ColorWrite
pub const ALL: ColorWrite
Enable writes to all channels.
pub const fn empty() -> ColorWrite
pub const fn empty() -> ColorWrite
Returns an empty set of flags
pub const fn all() -> ColorWrite
pub const fn all() -> ColorWrite
Returns the set containing all flags.
pub fn from_bits(bits: u32) -> Option<ColorWrite>
pub fn from_bits(bits: u32) -> Option<ColorWrite>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub const fn from_bits_truncate(bits: u32) -> ColorWrite
pub const fn from_bits_truncate(bits: u32) -> ColorWrite
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub const unsafe fn from_bits_unchecked(bits: u32) -> ColorWrite
pub const unsafe fn from_bits_unchecked(bits: u32) -> ColorWrite
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
pub const fn intersects(&self, other: ColorWrite) -> bool
pub const fn intersects(&self, other: ColorWrite) -> bool
Returns true
if there are flags common to both self
and other
.
pub const fn contains(&self, other: ColorWrite) -> bool
pub const fn contains(&self, other: ColorWrite) -> bool
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: ColorWrite)
pub fn insert(&mut self, other: ColorWrite)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: ColorWrite)
pub fn remove(&mut self, other: ColorWrite)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: ColorWrite)
pub fn toggle(&mut self, other: ColorWrite)
Toggles the specified flags in-place.
pub fn set(&mut self, other: ColorWrite, value: bool)
pub fn set(&mut self, other: ColorWrite, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Binary for ColorWrite
impl Binary for ColorWrite
impl BitAnd<ColorWrite> for ColorWrite
impl BitAnd<ColorWrite> for ColorWrite
pub fn bitand(self, other: ColorWrite) -> ColorWrite
pub fn bitand(self, other: ColorWrite) -> ColorWrite
Returns the intersection between the two sets of flags.
type Output = ColorWrite
type Output = ColorWrite
The resulting type after applying the &
operator.
impl BitAndAssign<ColorWrite> for ColorWrite
impl BitAndAssign<ColorWrite> for ColorWrite
pub fn bitand_assign(&mut self, other: ColorWrite)
pub fn bitand_assign(&mut self, other: ColorWrite)
Disables all flags disabled in the set.
impl BitOr<ColorWrite> for ColorWrite
impl BitOr<ColorWrite> for ColorWrite
pub fn bitor(self, other: ColorWrite) -> ColorWrite
pub fn bitor(self, other: ColorWrite) -> ColorWrite
Returns the union of the two sets of flags.
type Output = ColorWrite
type Output = ColorWrite
The resulting type after applying the |
operator.
impl BitOrAssign<ColorWrite> for ColorWrite
impl BitOrAssign<ColorWrite> for ColorWrite
pub fn bitor_assign(&mut self, other: ColorWrite)
pub fn bitor_assign(&mut self, other: ColorWrite)
Adds the set of flags.
impl BitXor<ColorWrite> for ColorWrite
impl BitXor<ColorWrite> for ColorWrite
pub fn bitxor(self, other: ColorWrite) -> ColorWrite
pub fn bitxor(self, other: ColorWrite) -> ColorWrite
Returns the left flags, but with all the right flags toggled.
type Output = ColorWrite
type Output = ColorWrite
The resulting type after applying the ^
operator.
impl BitXorAssign<ColorWrite> for ColorWrite
impl BitXorAssign<ColorWrite> for ColorWrite
pub fn bitxor_assign(&mut self, other: ColorWrite)
pub fn bitxor_assign(&mut self, other: ColorWrite)
Toggles the set of flags.
impl Clone for ColorWrite
impl Clone for ColorWrite
pub fn clone(&self) -> ColorWrite
pub fn clone(&self) -> ColorWrite
Returns a copy of the value. Read more
Performs copy-assignment from source
. Read more
impl Debug for ColorWrite
impl Debug for ColorWrite
impl Default for ColorWrite
impl Default for ColorWrite
pub fn default() -> ColorWrite
pub fn default() -> ColorWrite
Returns the “default value” for a type. Read more
impl Extend<ColorWrite> for ColorWrite
impl Extend<ColorWrite> for ColorWrite
pub fn extend<T>(&mut self, iterator: T) where
T: IntoIterator<Item = ColorWrite>,
pub fn extend<T>(&mut self, iterator: T) where
T: IntoIterator<Item = ColorWrite>,
Extends a collection with the contents of an iterator. Read more
extend_one
)Extends a collection with exactly one element.
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
impl FromIterator<ColorWrite> for ColorWrite
impl FromIterator<ColorWrite> for ColorWrite
pub fn from_iter<T>(iterator: T) -> ColorWrite where
T: IntoIterator<Item = ColorWrite>,
pub fn from_iter<T>(iterator: T) -> ColorWrite where
T: IntoIterator<Item = ColorWrite>,
Creates a value from an iterator. Read more
impl Hash for ColorWrite
impl Hash for ColorWrite
impl LowerHex for ColorWrite
impl LowerHex for ColorWrite
impl Not for ColorWrite
impl Not for ColorWrite
pub fn not(self) -> ColorWrite
pub fn not(self) -> ColorWrite
Returns the complement of this set of flags.
type Output = ColorWrite
type Output = ColorWrite
The resulting type after applying the !
operator.
impl Octal for ColorWrite
impl Octal for ColorWrite
impl Ord for ColorWrite
impl Ord for ColorWrite
pub fn cmp(&self, other: &ColorWrite) -> Ordering
pub fn cmp(&self, other: &ColorWrite) -> Ordering
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
impl PartialEq<ColorWrite> for ColorWrite
impl PartialEq<ColorWrite> for ColorWrite
pub fn eq(&self, other: &ColorWrite) -> bool
pub fn eq(&self, other: &ColorWrite) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
pub fn ne(&self, other: &ColorWrite) -> bool
pub fn ne(&self, other: &ColorWrite) -> bool
This method tests for !=
.
impl PartialOrd<ColorWrite> for ColorWrite
impl PartialOrd<ColorWrite> for ColorWrite
pub fn partial_cmp(&self, other: &ColorWrite) -> Option<Ordering>
pub fn partial_cmp(&self, other: &ColorWrite) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl Sub<ColorWrite> for ColorWrite
impl Sub<ColorWrite> for ColorWrite
pub fn sub(self, other: ColorWrite) -> ColorWrite
pub fn sub(self, other: ColorWrite) -> ColorWrite
Returns the set difference of the two sets of flags.
type Output = ColorWrite
type Output = ColorWrite
The resulting type after applying the -
operator.
impl SubAssign<ColorWrite> for ColorWrite
impl SubAssign<ColorWrite> for ColorWrite
pub fn sub_assign(&mut self, other: ColorWrite)
pub fn sub_assign(&mut self, other: ColorWrite)
Disables all flags enabled in the set.
impl UpperHex for ColorWrite
impl UpperHex for ColorWrite
impl Copy for ColorWrite
impl Eq for ColorWrite
impl StructuralEq for ColorWrite
impl StructuralPartialEq for ColorWrite
Auto Trait Implementations
impl RefUnwindSafe for ColorWrite
impl Send for ColorWrite
impl Sync for ColorWrite
impl Unpin for ColorWrite
impl UnwindSafe for ColorWrite
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
Mutably borrows from an owned value. Read more
impl<T> CallHasher for T where
T: Hash,
impl<T> CallHasher for T where
T: Hash,
Convert into T with values clamped to the color defined bounds Read more
Convert into T. The resulting color might be invalid in its color space Read more
Convert into T, returning ok if the color is inside of its defined range,
otherwise an OutOfBounds
error is returned which contains the unclamped color. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V