#[repr(i32)]pub enum GamepadAxis {
Unknown = 0,
LeftX = 1,
LeftY = 2,
RightX = 3,
RightY = 4,
LeftTrigger = 5,
RightTrigger = 6,
}
Variants§
Unknown = 0
LeftX = 1
The left and right joysticks on a standard two-stick gamepad.
LeftY = 2
RightX = 3
RightY = 4
LeftTrigger = 5
The soft triggers on a standard two-stick gamepad, usually called L2 and R2.
RightTrigger = 6
Implementations§
Source§impl GamepadAxis
impl GamepadAxis
Source§impl GamepadAxis
impl GamepadAxis
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for GamepadAxis
impl Clone for GamepadAxis
Source§fn clone(&self) -> GamepadAxis
fn clone(&self) -> GamepadAxis
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 GamepadAxis
impl Debug for GamepadAxis
Source§impl Default for GamepadAxis
impl Default for GamepadAxis
Source§fn default() -> GamepadAxis
fn default() -> GamepadAxis
Returns the “default value” for a type. Read more
Source§impl From<GamepadAxis> for i32
impl From<GamepadAxis> for i32
Source§fn from(value: GamepadAxis) -> i32
fn from(value: GamepadAxis) -> i32
Converts to this type from the input type.
Source§impl Hash for GamepadAxis
impl Hash for GamepadAxis
Source§impl Ord for GamepadAxis
impl Ord for GamepadAxis
Source§fn cmp(&self, other: &GamepadAxis) -> Ordering
fn cmp(&self, other: &GamepadAxis) -> 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 GamepadAxis
impl PartialEq for GamepadAxis
Source§impl PartialOrd for GamepadAxis
impl PartialOrd for GamepadAxis
Source§impl TryFrom<i32> for GamepadAxis
impl TryFrom<i32> for GamepadAxis
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<GamepadAxis, UnknownEnumValue>
fn try_from(value: i32) -> Result<GamepadAxis, UnknownEnumValue>
Performs the conversion.
impl Copy for GamepadAxis
impl Eq for GamepadAxis
impl StructuralPartialEq for GamepadAxis
Auto Trait Implementations§
impl Freeze for GamepadAxis
impl RefUnwindSafe for GamepadAxis
impl Send for GamepadAxis
impl Sync for GamepadAxis
impl Unpin for GamepadAxis
impl UnwindSafe for GamepadAxis
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