pub struct KeyMod { /* private fields */ }Expand description
Represents which keyboard meta keys are being pressed.
Implementations§
Source§impl KeyMod
impl KeyMod
Sourcepub fn from_bits(bits: u32) -> Option<KeyMod>
pub fn from_bits(bits: u32) -> Option<KeyMod>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub fn from_bits_truncate(bits: u32) -> KeyMod
pub fn from_bits_truncate(bits: u32) -> KeyMod
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub fn intersects(&self, other: KeyMod) -> bool
pub fn intersects(&self, other: KeyMod) -> bool
Returns true if there are flags common to both self and other.
Trait Implementations§
Source§impl BitAndAssign for KeyMod
impl BitAndAssign for KeyMod
Source§fn bitand_assign(&mut self, other: KeyMod)
fn bitand_assign(&mut self, other: KeyMod)
Disables all flags disabled in the set.
Source§impl BitOrAssign for KeyMod
impl BitOrAssign for KeyMod
Source§fn bitor_assign(&mut self, other: KeyMod)
fn bitor_assign(&mut self, other: KeyMod)
Adds the set of flags.
Source§impl BitXorAssign for KeyMod
impl BitXorAssign for KeyMod
Source§fn bitxor_assign(&mut self, other: KeyMod)
fn bitxor_assign(&mut self, other: KeyMod)
Toggles the set of flags.
Source§impl Extend<KeyMod> for KeyMod
impl Extend<KeyMod> for KeyMod
Source§fn extend<T: IntoIterator<Item = KeyMod>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = KeyMod>>(&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<KeyMod> for KeyMod
impl FromIterator<KeyMod> for KeyMod
Source§impl Ord for KeyMod
impl Ord for KeyMod
Source§impl PartialOrd for KeyMod
impl PartialOrd for KeyMod
Source§impl SubAssign for KeyMod
impl SubAssign for KeyMod
Source§fn sub_assign(&mut self, other: KeyMod)
fn sub_assign(&mut self, other: KeyMod)
Disables all flags enabled in the set.
impl Copy for KeyMod
impl Eq for KeyMod
impl StructuralPartialEq for KeyMod
Auto Trait Implementations§
impl Freeze for KeyMod
impl RefUnwindSafe for KeyMod
impl Send for KeyMod
impl Sync for KeyMod
impl Unpin for KeyMod
impl UnwindSafe for KeyMod
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