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 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 ==
.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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.