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 for Button
impl PartialEq for Button
source§impl PartialOrd for Button
impl PartialOrd 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 moreimpl Copy for Button
impl Eq for Button
impl StructuralPartialEq for Button
Auto Trait Implementations§
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