#[repr(u32)]
pub enum Source {
Show 15 variants
Unknown,
Keyboard,
Dpad,
Gamepad,
Touchscreen,
Mouse,
Stylus,
BluetoothStylus,
Trackball,
MouseRelative,
Touchpad,
TouchNavigation,
Joystick,
RotaryEncoder,
Any,
}
Expand description
An enum representing the source of an InputEvent
.
See the NDK docs
Variants
Unknown
Keyboard
Dpad
Gamepad
Touchscreen
Mouse
Stylus
BluetoothStylus
Trackball
MouseRelative
Touchpad
TouchNavigation
Joystick
RotaryEncoder
Any
Trait Implementations
sourceimpl TryFrom<u32> for Source
impl TryFrom<u32> for Source
type Error = TryFromPrimitiveError<Source>
type Error = TryFromPrimitiveError<Source>
The type returned in the event of a conversion error.
sourcefn try_from(number: u32) -> Result<Self, TryFromPrimitiveError<Self>>
fn try_from(number: u32) -> Result<Self, TryFromPrimitiveError<Self>>
Performs the conversion.
sourceimpl TryFromPrimitive for Source
impl TryFromPrimitive for Source
type Primitive = u32
const NAME: &'static str = _
fn try_from_primitive(
number: Self::Primitive
) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for Source
impl Eq for Source
impl StructuralEq for Source
impl StructuralPartialEq for Source
Auto Trait Implementations
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnwindSafe for Source
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more