pub enum Device {
Keyboard,
Pointer,
Touch,
Gamepad,
}Expand description
A kind of input device.
Variants§
Keyboard
A key.
Pointer
A mouse, or a platform’s emulated pointer — which is how a phone’s primary contact arrives.
Touch
An on-screen control, reported through ActionMap::virtual_button or
ActionMap::virtual_stick.
Gamepad
A gamepad. Every backend reports through
ActionMap::gamepad_event, so which one spoke — XInput, evdev,
Steam Input — is not something this can tell apart, by design.
Trait Implementations§
impl Copy for Device
impl Eq for Device
impl StructuralPartialEq for Device
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnsafeUnpin for Device
impl UnwindSafe for Device
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