pub struct StateMask { /* private fields */ }Implementations§
Source§impl StateMask
impl StateMask
Sourcepub fn set<T>(&mut self, other: T)
pub fn set<T>(&mut self, other: T)
Set all other flags.
other can be either a single flag or another mask.
Sourcepub fn unset<T>(&mut self, other: T)
pub fn unset<T>(&mut self, other: T)
Unset all other flags.
other can be either a single flag or another mask.
Sourcepub fn toggle<T>(&mut self, other: T)
pub fn toggle<T>(&mut self, other: T)
Toggle all other flags.
other can be either a single flag or another mask.
Sourcepub fn contains<T>(&self, other: T) -> bool
pub fn contains<T>(&self, other: T) -> bool
Check if the mask contains all of other’s flags.
other can be either a single flag or another mask.
Sourcepub fn intersects<T>(&self, other: T) -> bool
pub fn intersects<T>(&self, other: T) -> bool
Check if the mask has common flags with other.
other can be either a single flag or another mask.
Trait Implementations§
Source§impl BitAndAssign<State> for StateMask
impl BitAndAssign<State> for StateMask
Source§fn bitand_assign(&mut self, other: State)
fn bitand_assign(&mut self, other: State)
Performs the
&= operation. Read moreSource§impl BitAndAssign for StateMask
impl BitAndAssign for StateMask
Source§fn bitand_assign(&mut self, other: StateMask)
fn bitand_assign(&mut self, other: StateMask)
Performs the
&= operation. Read moreSource§impl BitOrAssign<State> for StateMask
impl BitOrAssign<State> for StateMask
Source§fn bitor_assign(&mut self, other: State)
fn bitor_assign(&mut self, other: State)
Performs the
|= operation. Read moreSource§impl BitOrAssign for StateMask
impl BitOrAssign for StateMask
Source§fn bitor_assign(&mut self, other: StateMask)
fn bitor_assign(&mut self, other: StateMask)
Performs the
|= operation. Read moreSource§impl BitXorAssign<State> for StateMask
impl BitXorAssign<State> for StateMask
Source§fn bitxor_assign(&mut self, other: State)
fn bitxor_assign(&mut self, other: State)
Performs the
^= operation. Read moreSource§impl BitXorAssign for StateMask
impl BitXorAssign for StateMask
Source§fn bitxor_assign(&mut self, other: StateMask)
fn bitxor_assign(&mut self, other: StateMask)
Performs the
^= operation. Read moreSource§impl Ord for StateMask
impl Ord for StateMask
Source§impl PartialOrd for StateMask
impl PartialOrd for StateMask
impl Copy for StateMask
impl Eq for StateMask
impl StructuralPartialEq for StateMask
Auto Trait Implementations§
impl Freeze for StateMask
impl RefUnwindSafe for StateMask
impl Send for StateMask
impl Sync for StateMask
impl Unpin for StateMask
impl UnwindSafe for StateMask
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