pub struct ColorMask { /* private fields */ }Expand description
TODO: use this type in API
Implementations§
Source§impl ColorMask
impl ColorMask
pub const NONE: ColorMask
pub const R: ColorMask
pub const G: ColorMask
pub const B: ColorMask
pub const A: ColorMask
pub const RGB: ColorMask
pub const RGBA: ColorMask
Sourcepub fn from_bits(bits: u32) -> Option<ColorMask>
pub fn from_bits(bits: u32) -> Option<ColorMask>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: u32) -> ColorMask
pub const fn from_bits_truncate(bits: u32) -> ColorMask
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> ColorMask
pub const unsafe fn from_bits_unchecked(bits: u32) -> ColorMask
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Sourcepub const fn intersects(&self, other: ColorMask) -> bool
pub const fn intersects(&self, other: ColorMask) -> bool
Returns true if there are flags common to both self and other.
Trait Implementations§
Source§impl BitAndAssign for ColorMask
impl BitAndAssign for ColorMask
Source§fn bitand_assign(&mut self, other: ColorMask)
fn bitand_assign(&mut self, other: ColorMask)
Disables all flags disabled in the set.
Source§impl BitOrAssign for ColorMask
impl BitOrAssign for ColorMask
Source§fn bitor_assign(&mut self, other: ColorMask)
fn bitor_assign(&mut self, other: ColorMask)
Adds the set of flags.
Source§impl BitXorAssign for ColorMask
impl BitXorAssign for ColorMask
Source§fn bitxor_assign(&mut self, other: ColorMask)
fn bitxor_assign(&mut self, other: ColorMask)
Toggles the set of flags.
Source§impl Extend<ColorMask> for ColorMask
impl Extend<ColorMask> for ColorMask
Source§fn extend<T: IntoIterator<Item = ColorMask>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = ColorMask>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl FromIterator<ColorMask> for ColorMask
impl FromIterator<ColorMask> for ColorMask
Source§impl Ord for ColorMask
impl Ord for ColorMask
Source§impl PartialOrd for ColorMask
impl PartialOrd for ColorMask
Source§impl SubAssign for ColorMask
impl SubAssign for ColorMask
Source§fn sub_assign(&mut self, other: ColorMask)
fn sub_assign(&mut self, other: ColorMask)
Disables all flags enabled in the set.
impl Copy for ColorMask
impl Eq for ColorMask
impl StructuralPartialEq for ColorMask
Auto Trait Implementations§
impl Freeze for ColorMask
impl RefUnwindSafe for ColorMask
impl Send for ColorMask
impl Sync for ColorMask
impl Unpin for ColorMask
impl UnwindSafe for ColorMask
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