Enum rich_sdl2_rust::event::game_controller::button::Button
source · #[non_exhaustive]
pub enum Button {
LeftFour(FourButton),
RightFour(FourButton),
Back,
Guide,
Start,
LeftStick,
RightStick,
LeftShoulder,
RightShoulder,
}
Expand description
A button on a game controller except the trigger buttons.
Trigger buttons are covered by super::axis::Axis
.
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.
LeftFour(FourButton)
Four buttons on the left.
RightFour(FourButton)
Four buttons on the right.
Back
A back button on the center.
Guide
A meta button on the center.
Start
A start button on the center.
LeftStick
A stick push button on the left.
RightStick
A stick push button on the right.
LeftShoulder
A sub trigger button on the left.
RightShoulder
A sub trigger button on the right.
Implementations§
Trait Implementations§
source§impl PartialEq<Button> for Button
impl PartialEq<Button> for Button
source§impl PartialOrd<Button> for Button
impl PartialOrd<Button> for Button
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more