#[repr(i32)]pub enum GamepadButton {
Show 15 variants
ButtonA = 0,
ButtonB = 1,
ButtonX = 2,
ButtonY = 3,
ButtonLeftBumper = 4,
ButtonRightBumper = 5,
ButtonBack = 6,
ButtonStart = 7,
ButtonGuide = 8,
ButtonLeftThumb = 9,
ButtonRightThumb = 10,
ButtonDpadUp = 11,
ButtonDpadRight = 12,
ButtonDpadDown = 13,
ButtonDpadLeft = 14,
}
Expand description
Button identifier tokens.
Variants§
ButtonA = 0
ButtonB = 1
ButtonX = 2
ButtonY = 3
ButtonLeftBumper = 4
ButtonRightBumper = 5
ButtonBack = 6
ButtonStart = 7
ButtonGuide = 8
ButtonLeftThumb = 9
ButtonRightThumb = 10
ButtonDpadUp = 11
ButtonDpadRight = 12
ButtonDpadDown = 13
ButtonDpadLeft = 14
Implementations§
Source§impl GamepadButton
impl GamepadButton
Sourcepub fn from_i32(n: i32) -> Option<GamepadButton>
pub fn from_i32(n: i32) -> Option<GamepadButton>
Converts from i32
.
Trait Implementations§
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 Ord for GamepadButton
impl Ord for GamepadButton
Source§fn cmp(&self, other: &GamepadButton) -> Ordering
fn cmp(&self, other: &GamepadButton) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for GamepadButton
impl PartialEq for GamepadButton
Source§impl PartialOrd for GamepadButton
impl PartialOrd for GamepadButton
impl Copy for GamepadButton
impl Eq for GamepadButton
impl StructuralPartialEq for GamepadButton
Auto Trait Implementations§
impl Freeze for GamepadButton
impl RefUnwindSafe for GamepadButton
impl Send for GamepadButton
impl Sync for GamepadButton
impl Unpin for GamepadButton
impl UnwindSafe for GamepadButton
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more