Struct rinwindow::events::KeyModifiers [−]
pub struct KeyModifiers { /* fields omitted */ }
Methods
impl KeyModifiers
impl KeyModifiers
pub const SHIFT: KeyModifiers
SHIFT: KeyModifiers = KeyModifiers{bits: 1,}
pub const CONTROL: KeyModifiers
CONTROL: KeyModifiers = KeyModifiers{bits: 2,}
pub const ALT: KeyModifiers
ALT: KeyModifiers = KeyModifiers{bits: 4,}
pub const SUPER: KeyModifiers
SUPER: KeyModifiers = KeyModifiers{bits: 8,}
pub fn empty() -> KeyModifiers
pub fn empty() -> KeyModifiers
Returns an empty set of flags.
pub fn all() -> KeyModifiers
pub fn all() -> KeyModifiers
Returns the set containing all flags.
pub fn bits(&self) -> i32
pub fn bits(&self) -> i32
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: i32) -> Option<KeyModifiers>
pub fn from_bits(bits: i32) -> Option<KeyModifiers>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub fn from_bits_truncate(bits: i32) -> KeyModifiers
pub fn from_bits_truncate(bits: i32) -> KeyModifiers
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
pub fn is_all(&self) -> bool
pub fn is_all(&self) -> bool
Returns true
if all flags are currently set.
pub fn intersects(&self, other: KeyModifiers) -> bool
pub fn intersects(&self, other: KeyModifiers) -> bool
Returns true
if there are flags common to both self
and other
.
pub fn contains(&self, other: KeyModifiers) -> bool
pub fn contains(&self, other: KeyModifiers) -> bool
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: KeyModifiers)
pub fn insert(&mut self, other: KeyModifiers)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: KeyModifiers)
pub fn remove(&mut self, other: KeyModifiers)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: KeyModifiers)
pub fn toggle(&mut self, other: KeyModifiers)
Toggles the specified flags in-place.
pub fn set(&mut self, other: KeyModifiers, value: bool)
pub fn set(&mut self, other: KeyModifiers, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Copy for KeyModifiers
impl Copy for KeyModifiers
impl PartialEq for KeyModifiers
impl PartialEq for KeyModifiers
fn eq(&self, other: &KeyModifiers) -> bool
fn eq(&self, other: &KeyModifiers) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &KeyModifiers) -> bool
fn ne(&self, other: &KeyModifiers) -> bool
This method tests for !=
.
impl Eq for KeyModifiers
impl Eq for KeyModifiers
impl Clone for KeyModifiers
impl Clone for KeyModifiers
fn clone(&self) -> KeyModifiers
fn clone(&self) -> KeyModifiers
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialOrd for KeyModifiers
impl PartialOrd for KeyModifiers
fn partial_cmp(&self, other: &KeyModifiers) -> Option<Ordering>
fn partial_cmp(&self, other: &KeyModifiers) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &KeyModifiers) -> bool
fn lt(&self, other: &KeyModifiers) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &KeyModifiers) -> bool
fn le(&self, other: &KeyModifiers) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &KeyModifiers) -> bool
fn gt(&self, other: &KeyModifiers) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &KeyModifiers) -> bool
fn ge(&self, other: &KeyModifiers) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for KeyModifiers
impl Ord for KeyModifiers
fn cmp(&self, other: &KeyModifiers) -> Ordering
fn cmp(&self, other: &KeyModifiers) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for KeyModifiers
impl Hash for KeyModifiers
fn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)
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]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for KeyModifiers
impl Debug for KeyModifiers
impl Binary for KeyModifiers
impl Binary for KeyModifiers
impl Octal for KeyModifiers
impl Octal for KeyModifiers
impl LowerHex for KeyModifiers
impl LowerHex for KeyModifiers
impl UpperHex for KeyModifiers
impl UpperHex for KeyModifiers
impl BitOr for KeyModifiers
impl BitOr for KeyModifiers
type Output = KeyModifiers
The resulting type after applying the |
operator.
fn bitor(self, other: KeyModifiers) -> KeyModifiers
fn bitor(self, other: KeyModifiers) -> KeyModifiers
Returns the union of the two sets of flags.
impl BitOrAssign for KeyModifiers
impl BitOrAssign for KeyModifiers
fn bitor_assign(&mut self, other: KeyModifiers)
fn bitor_assign(&mut self, other: KeyModifiers)
Adds the set of flags.
impl BitXor for KeyModifiers
impl BitXor for KeyModifiers
type Output = KeyModifiers
The resulting type after applying the ^
operator.
fn bitxor(self, other: KeyModifiers) -> KeyModifiers
fn bitxor(self, other: KeyModifiers) -> KeyModifiers
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign for KeyModifiers
impl BitXorAssign for KeyModifiers
fn bitxor_assign(&mut self, other: KeyModifiers)
fn bitxor_assign(&mut self, other: KeyModifiers)
Toggles the set of flags.
impl BitAnd for KeyModifiers
impl BitAnd for KeyModifiers
type Output = KeyModifiers
The resulting type after applying the &
operator.
fn bitand(self, other: KeyModifiers) -> KeyModifiers
fn bitand(self, other: KeyModifiers) -> KeyModifiers
Returns the intersection between the two sets of flags.
impl BitAndAssign for KeyModifiers
impl BitAndAssign for KeyModifiers
fn bitand_assign(&mut self, other: KeyModifiers)
fn bitand_assign(&mut self, other: KeyModifiers)
Disables all flags disabled in the set.
impl Sub for KeyModifiers
impl Sub for KeyModifiers
type Output = KeyModifiers
The resulting type after applying the -
operator.
fn sub(self, other: KeyModifiers) -> KeyModifiers
fn sub(self, other: KeyModifiers) -> KeyModifiers
Returns the set difference of the two sets of flags.
impl SubAssign for KeyModifiers
impl SubAssign for KeyModifiers
fn sub_assign(&mut self, other: KeyModifiers)
fn sub_assign(&mut self, other: KeyModifiers)
Disables all flags enabled in the set.
impl Not for KeyModifiers
impl Not for KeyModifiers
type Output = KeyModifiers
The resulting type after applying the !
operator.
fn not(self) -> KeyModifiers
fn not(self) -> KeyModifiers
Returns the complement of this set of flags.
impl Extend<KeyModifiers> for KeyModifiers
impl Extend<KeyModifiers> for KeyModifiers
fn extend<T: IntoIterator<Item = KeyModifiers>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = KeyModifiers>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
impl FromIterator<KeyModifiers> for KeyModifiers
impl FromIterator<KeyModifiers> for KeyModifiers
fn from_iter<T: IntoIterator<Item = KeyModifiers>>(iterator: T) -> KeyModifiers
fn from_iter<T: IntoIterator<Item = KeyModifiers>>(iterator: T) -> KeyModifiers
Creates a value from an iterator. Read more
Auto Trait Implementations
impl Send for KeyModifiers
impl Send for KeyModifiers
impl Sync for KeyModifiers
impl Sync for KeyModifiers