Struct glutin::ModifiersState
source · pub struct ModifiersState {
pub shift: bool,
pub ctrl: bool,
pub alt: bool,
pub logo: bool,
}
Expand description
Represents the current state of the keyboard modifiers
Each field of this struct represents a modifier and is true
if this modifier is active.
Fields§
§shift: bool
The “shift” key
ctrl: bool
The “control” key
alt: bool
The “alt” key
logo: bool
The “logo” key
This is the “windows” key on PC and “command” key on Mac.
Trait Implementations§
source§impl Clone for ModifiersState
impl Clone for ModifiersState
source§fn clone(&self) -> ModifiersState
fn clone(&self) -> ModifiersState
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 moresource§impl Debug for ModifiersState
impl Debug for ModifiersState
source§impl Default for ModifiersState
impl Default for ModifiersState
source§fn default() -> ModifiersState
fn default() -> ModifiersState
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ModifiersStatewhere
ModifiersState: Default,
impl<'de> Deserialize<'de> for ModifiersStatewhere ModifiersState: Default,
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<ModifiersState, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<ModifiersState, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<ModifiersState> for ModifiersState
impl From<ModifiersState> for ModifiersState
source§fn from(mods: ModifiersState) -> ModifiersState
fn from(mods: ModifiersState) -> ModifiersState
Converts to this type from the input type.
source§impl From<XIModifierState> for ModifiersState
impl From<XIModifierState> for ModifiersState
source§fn from(mods: XIModifierState) -> ModifiersState
fn from(mods: XIModifierState) -> ModifiersState
Converts to this type from the input type.
source§impl Hash for ModifiersState
impl Hash for ModifiersState
source§impl PartialEq<ModifiersState> for ModifiersState
impl PartialEq<ModifiersState> for ModifiersState
source§fn eq(&self, other: &ModifiersState) -> bool
fn eq(&self, other: &ModifiersState) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ModifiersState
impl Serialize for ModifiersState
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for ModifiersState
impl Eq for ModifiersState
impl StructuralEq for ModifiersState
impl StructuralPartialEq for ModifiersState
Auto Trait Implementations§
impl RefUnwindSafe for ModifiersState
impl Send for ModifiersState
impl Sync for ModifiersState
impl Unpin for ModifiersState
impl UnwindSafe for ModifiersState
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