pub struct ColorFlag(u8);
Tuple Fields§
§0: u8
Implementations§
source§impl ColorFlag
impl ColorFlag
sourcepub fn contains(self, flag: impl Into<u8>) -> bool
pub fn contains(self, flag: impl Into<u8>) -> bool
Check if this object has all bits set that are also set in flag
.
flag
can be a single enum variant or a whole other mask.
sourcepub fn intersects(self, flag: impl Into<u8>) -> bool
pub fn intersects(self, flag: impl Into<u8>) -> bool
Check if this object has some bits set that are also set in flag
.
flag
can be a single enum variant or a whole other mask.
Trait Implementations§
source§impl BitAndAssign<u8> for ColorFlag
impl BitAndAssign<u8> for ColorFlag
source§fn bitand_assign(&mut self, other: u8)
fn bitand_assign(&mut self, other: u8)
Performs the
&=
operation. Read moresource§impl BitAndAssign for ColorFlag
impl BitAndAssign for ColorFlag
source§fn bitand_assign(&mut self, other: ColorFlag)
fn bitand_assign(&mut self, other: ColorFlag)
Performs the
&=
operation. Read moresource§impl BitOrAssign<u8> for ColorFlag
impl BitOrAssign<u8> for ColorFlag
source§fn bitor_assign(&mut self, other: u8)
fn bitor_assign(&mut self, other: u8)
Performs the
|=
operation. Read moresource§impl BitOrAssign for ColorFlag
impl BitOrAssign for ColorFlag
source§fn bitor_assign(&mut self, other: ColorFlag)
fn bitor_assign(&mut self, other: ColorFlag)
Performs the
|=
operation. Read moresource§impl Ord for ColorFlag
impl Ord for ColorFlag
source§impl PartialOrd for ColorFlag
impl PartialOrd for ColorFlag
impl Copy for ColorFlag
impl Eq for ColorFlag
impl StructuralPartialEq for ColorFlag
Auto Trait Implementations§
impl Freeze for ColorFlag
impl RefUnwindSafe for ColorFlag
impl Send for ColorFlag
impl Sync for ColorFlag
impl Unpin for ColorFlag
impl UnwindSafe for ColorFlag
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)