pub enum InputEventType {
KeyDown(u8),
KeyUp(u8),
MouseDown {
button: u8,
x: i16,
y: i16,
},
MouseUp {
button: u8,
x: i16,
y: i16,
},
MouseMove {
x: i16,
y: i16,
},
TouchStart {
id: u8,
x: i16,
y: i16,
},
TouchMove {
id: u8,
x: i16,
y: i16,
},
TouchEnd {
id: u8,
x: i16,
y: i16,
},
GamepadDown {
gamepad: u8,
button: u8,
},
GamepadUp {
gamepad: u8,
button: u8,
},
GamepadAxis {
gamepad: u8,
axis: u8,
value: i16,
},
}Expand description
Input event type for trace recording.
Variants§
KeyDown(u8)
Key pressed (key code)
KeyUp(u8)
Key released (key code)
MouseDown
Mouse button pressed (button, x, y)
MouseUp
Mouse button released (button, x, y)
MouseMove
Mouse moved (x, y)
TouchStart
Touch started (id, x, y)
TouchMove
Touch moved (id, x, y)
TouchEnd
Touch ended (id, x, y)
GamepadDown
Gamepad button pressed (gamepad, button)
GamepadUp
Gamepad button released (gamepad, button)
GamepadAxis
Gamepad axis moved (gamepad, axis, value)
Trait Implementations§
Source§impl Clone for InputEventType
impl Clone for InputEventType
Source§fn clone(&self) -> InputEventType
fn clone(&self) -> InputEventType
Returns a duplicate 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 InputEventType
impl Debug for InputEventType
Source§impl<'de> Deserialize<'de> for InputEventType
impl<'de> Deserialize<'de> for InputEventType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for InputEventType
impl PartialEq for InputEventType
Source§impl Serialize for InputEventType
impl Serialize for InputEventType
impl Copy for InputEventType
impl Eq for InputEventType
impl StructuralPartialEq for InputEventType
Auto Trait Implementations§
impl Freeze for InputEventType
impl RefUnwindSafe for InputEventType
impl Send for InputEventType
impl Sync for InputEventType
impl Unpin for InputEventType
impl UnwindSafe for InputEventType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more