Enum android_activity::input::Button
source · #[non_exhaustive]#[repr(u32)]pub enum Button {
Back = 8,
Forward = 16,
Primary = 1,
Secondary = 2,
StylusPrimary = 32,
StylusSecondary = 64,
Tertiary = 4,
}
Expand description
Identifies buttons that are associated with motion events.
See the NDK docs
§Android Extensible Enum
This is a runtime extensible enum and
should be handled similar to a #[non_exhaustive]
enum to maintain
forwards compatibility.
This implements Into<u32>
and From<u32>
for converting to/from Android
SDK integer values.
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.
Back = 8
Forward = 16
Primary = 1
Secondary = 2
StylusPrimary = 32
StylusSecondary = 64
Tertiary = 4
Trait Implementations§
source§impl FromPrimitive for Button
impl FromPrimitive for Button
source§impl PartialEq for Button
impl PartialEq for Button
impl Copy for Button
impl Eq for Button
impl StructuralPartialEq for Button
Auto Trait Implementations§
impl Freeze for Button
impl RefUnwindSafe for Button
impl Send for Button
impl Sync for Button
impl Unpin for Button
impl UnwindSafe for Button
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