#[non_exhaustive]pub enum InputEvent {
FocusChanged {
focused: bool,
},
Keyboard {
key: KeyCode,
state: ButtonState,
repeat: bool,
modifiers: Modifiers,
},
ModifiersChanged(Modifiers),
PointerMoved {
position: LogicalPosition,
modifiers: Modifiers,
},
PointerButton {
button: PointerButton,
state: ButtonState,
position: LogicalPosition,
modifiers: Modifiers,
},
Scroll {
delta: ScrollDelta,
position: LogicalPosition,
modifiers: Modifiers,
},
}Expand description
One ordered gameplay-oriented input transition from the native event queue.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
FocusChanged
The window gained or lost keyboard focus.
Keyboard
A physical key changed state.
ModifiersChanged(Modifiers)
The aggregate modifier state changed.
PointerMoved
The pointer moved in logical client coordinates.
PointerButton
A pointer button changed state.
Scroll
A wheel or trackpad supplied a scroll delta at the pointer position.
Trait Implementations§
Source§impl Clone for InputEvent
impl Clone for InputEvent
Source§fn clone(&self) -> InputEvent
fn clone(&self) -> InputEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for InputEvent
Source§impl Debug for InputEvent
impl Debug for InputEvent
Source§impl PartialEq for InputEvent
impl PartialEq for InputEvent
impl StructuralPartialEq for InputEvent
Auto Trait Implementations§
impl Freeze for InputEvent
impl RefUnwindSafe for InputEvent
impl Send for InputEvent
impl Sync for InputEvent
impl Unpin for InputEvent
impl UnsafeUnpin for InputEvent
impl UnwindSafe for InputEvent
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