Enum ark_api::applet::GamepadButton
source · #[non_exhaustive]
pub enum GamepadButton {
North,
East,
South,
West,
Select,
Mode,
Start,
LeftBumper,
RightBumper,
LeftStick,
RightStick,
}Expand description
Describes a button of a gamepad controller.
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.
Trait Implementations§
source§impl CheckedBitPattern for GamepadButton
impl CheckedBitPattern for GamepadButton
§type Bits = u32
type Bits = u32
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.source§fn is_valid_bit_pattern(
bits: &<GamepadButton as CheckedBitPattern>::Bits
) -> bool
fn is_valid_bit_pattern( bits: &<GamepadButton as CheckedBitPattern>::Bits ) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.source§impl Clone for GamepadButton
impl Clone for GamepadButton
source§fn clone(&self) -> GamepadButton
fn clone(&self) -> GamepadButton
Returns a copy 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 GamepadButton
impl Debug for GamepadButton
source§impl Hash for GamepadButton
impl Hash for GamepadButton
source§impl PartialEq<GamepadButton> for GamepadButton
impl PartialEq<GamepadButton> for GamepadButton
source§fn eq(&self, other: &GamepadButton) -> bool
fn eq(&self, other: &GamepadButton) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl TryFrom<u32> for GamepadButton
impl TryFrom<u32> for GamepadButton
§type Error = TryFromPrimitiveError<GamepadButton>
type Error = TryFromPrimitiveError<GamepadButton>
The type returned in the event of a conversion error.
source§fn try_from(
number: u32
) -> Result<GamepadButton, TryFromPrimitiveError<GamepadButton>>
fn try_from( number: u32 ) -> Result<GamepadButton, TryFromPrimitiveError<GamepadButton>>
Performs the conversion.