Struct KeyButMask
pub struct KeyButMask(/* private fields */);
Implementations§
§impl KeyButMask
impl KeyButMask
pub const SHIFT: KeyButMask = _
pub const LOCK: KeyButMask = _
pub const CONTROL: KeyButMask = _
pub const MOD1: KeyButMask = _
pub const MOD2: KeyButMask = _
pub const MOD3: KeyButMask = _
pub const MOD4: KeyButMask = _
pub const MOD5: KeyButMask = _
pub const BUTTON1: KeyButMask = _
pub const BUTTON2: KeyButMask = _
pub const BUTTON3: KeyButMask = _
pub const BUTTON4: KeyButMask = _
pub const BUTTON5: KeyButMask = _
§impl KeyButMask
impl KeyButMask
pub fn contains(self, flag: impl Into<u16>) -> bool
pub fn contains(self, flag: impl Into<u16>) -> 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.
pub fn intersects(self, flag: impl Into<u16>) -> bool
pub fn intersects(self, flag: impl Into<u16>) -> 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.
pub fn remove(self, flags: impl Into<u16>) -> KeyButMask
pub fn remove(self, flags: impl Into<u16>) -> KeyButMask
Remove some flags.
All bits that are set in the given flags are removed from the self
instance, if
they are present.
Trait Implementations§
§impl BitAnd<u16> for KeyButMask
impl BitAnd<u16> for KeyButMask
§impl BitAnd for KeyButMask
impl BitAnd for KeyButMask
§type Output = KeyButMask
type Output = KeyButMask
The resulting type after applying the
&
operator.§fn bitand(self, other: KeyButMask) -> <KeyButMask as BitAnd>::Output
fn bitand(self, other: KeyButMask) -> <KeyButMask as BitAnd>::Output
Performs the
&
operation. Read more§impl BitAndAssign<u16> for KeyButMask
impl BitAndAssign<u16> for KeyButMask
§fn bitand_assign(&mut self, other: u16)
fn bitand_assign(&mut self, other: u16)
Performs the
&=
operation. Read more§impl BitAndAssign for KeyButMask
impl BitAndAssign for KeyButMask
§fn bitand_assign(&mut self, other: KeyButMask)
fn bitand_assign(&mut self, other: KeyButMask)
Performs the
&=
operation. Read more§impl BitOr<u16> for KeyButMask
impl BitOr<u16> for KeyButMask
§impl BitOr for KeyButMask
impl BitOr for KeyButMask
§type Output = KeyButMask
type Output = KeyButMask
The resulting type after applying the
|
operator.§fn bitor(self, other: KeyButMask) -> <KeyButMask as BitOr>::Output
fn bitor(self, other: KeyButMask) -> <KeyButMask as BitOr>::Output
Performs the
|
operation. Read more§impl BitOrAssign<u16> for KeyButMask
impl BitOrAssign<u16> for KeyButMask
§fn bitor_assign(&mut self, other: u16)
fn bitor_assign(&mut self, other: u16)
Performs the
|=
operation. Read more§impl BitOrAssign for KeyButMask
impl BitOrAssign for KeyButMask
§fn bitor_assign(&mut self, other: KeyButMask)
fn bitor_assign(&mut self, other: KeyButMask)
Performs the
|=
operation. Read more§impl Clone for KeyButMask
impl Clone for KeyButMask
§fn clone(&self) -> KeyButMask
fn clone(&self) -> KeyButMask
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for KeyButMask
impl Debug for KeyButMask
§impl Default for KeyButMask
impl Default for KeyButMask
§fn default() -> KeyButMask
fn default() -> KeyButMask
Returns the “default value” for a type. Read more
§impl From<u16> for KeyButMask
impl From<u16> for KeyButMask
§fn from(value: u16) -> KeyButMask
fn from(value: u16) -> KeyButMask
Converts to this type from the input type.
§impl From<u8> for KeyButMask
impl From<u8> for KeyButMask
§fn from(value: u8) -> KeyButMask
fn from(value: u8) -> KeyButMask
Converts to this type from the input type.
§impl Hash for KeyButMask
impl Hash for KeyButMask
§impl Ord for KeyButMask
impl Ord for KeyButMask
§impl PartialEq for KeyButMask
impl PartialEq for KeyButMask
§impl PartialOrd for KeyButMask
impl PartialOrd for KeyButMask
impl Copy for KeyButMask
impl Eq for KeyButMask
impl StructuralPartialEq for KeyButMask
Auto Trait Implementations§
impl Freeze for KeyButMask
impl RefUnwindSafe for KeyButMask
impl Send for KeyButMask
impl Sync for KeyButMask
impl Unpin for KeyButMask
impl UnwindSafe for KeyButMask
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
)