Struct gfx::state::ColorMask
[−]
[src]
pub struct ColorMask { /* fields omitted */ }
Methods
impl ColorMask
[src]
const RED: ColorMask
RED: ColorMask = ColorMask{bits: 1,}
const GREEN: ColorMask
GREEN: ColorMask = ColorMask{bits: 2,}
const BLUE: ColorMask
BLUE: ColorMask = ColorMask{bits: 4,}
const ALPHA: ColorMask
ALPHA: ColorMask = ColorMask{bits: 8,}
fn empty() -> ColorMask
[src]
Returns an empty set of flags.
fn all() -> ColorMask
[src]
Returns the set containing all flags.
fn bits(&self) -> u8
[src]
Returns the raw value of the flags currently stored.
fn from_bits(bits: u8) -> Option<ColorMask>
[src]
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
fn from_bits_truncate(bits: u8) -> ColorMask
[src]
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
fn is_empty(&self) -> bool
[src]
Returns true
if no flags are currently stored.
fn is_all(&self) -> bool
[src]
Returns true
if all flags are currently set.
fn intersects(&self, other: ColorMask) -> bool
[src]
Returns true
if there are flags common to both self
and other
.
fn contains(&self, other: ColorMask) -> bool
[src]
Returns true
all of the flags in other
are contained within self
.
fn insert(&mut self, other: ColorMask)
[src]
Inserts the specified flags in-place.
fn remove(&mut self, other: ColorMask)
[src]
Removes the specified flags in-place.
fn toggle(&mut self, other: ColorMask)
[src]
Toggles the specified flags in-place.
fn set(&mut self, other: ColorMask, value: bool)
[src]
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Ord for ColorMask
[src]
impl BitXorAssign<ColorMask> for ColorMask
[src]
fn bitxor_assign(&mut self, other: ColorMask)
[src]
Toggles the set of flags.
impl Copy for ColorMask
[src]
impl Not for ColorMask
[src]
impl UpperHex for ColorMask
[src]
impl Hash for ColorMask
[src]
fn hash<__H>(&self, __arg_0: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Clone for ColorMask
[src]
fn clone(&self) -> ColorMask
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for ColorMask
[src]
impl BitXor<ColorMask> for ColorMask
[src]
type Output = ColorMask
fn bitxor(self, other: ColorMask) -> ColorMask
[src]
Returns the left flags, but with all the right flags toggled.
impl BitOr<ColorMask> for ColorMask
[src]
type Output = ColorMask
fn bitor(self, other: ColorMask) -> ColorMask
[src]
Returns the union of the two sets of flags.
impl BitOrAssign<ColorMask> for ColorMask
[src]
fn bitor_assign(&mut self, other: ColorMask)
[src]
Adds the set of flags.
impl Octal for ColorMask
[src]
impl BitAndAssign<ColorMask> for ColorMask
[src]
fn bitand_assign(&mut self, other: ColorMask)
[src]
Disables all flags disabled in the set.
impl PartialEq<ColorMask> for ColorMask
[src]
fn eq(&self, __arg_0: &ColorMask) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ColorMask) -> bool
[src]
This method tests for !=
.
impl Debug for ColorMask
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter.
impl Extend<ColorMask> for ColorMask
[src]
fn extend<T>(&mut self, iterator: T) where
T: IntoIterator<Item = ColorMask>,
[src]
T: IntoIterator<Item = ColorMask>,
impl Binary for ColorMask
[src]
impl FromIterator<ColorMask> for ColorMask
[src]
fn from_iter<T>(iterator: T) -> ColorMask where
T: IntoIterator<Item = ColorMask>,
[src]
T: IntoIterator<Item = ColorMask>,
impl LowerHex for ColorMask
[src]
impl SubAssign<ColorMask> for ColorMask
[src]
fn sub_assign(&mut self, other: ColorMask)
[src]
Disables all flags enabled in the set.
impl Sub<ColorMask> for ColorMask
[src]
type Output = ColorMask
fn sub(self, other: ColorMask) -> ColorMask
[src]
Returns the set difference of the two sets of flags.