Enum sdl2::controller::Axis
source · #[repr(i32)]pub enum Axis {
LeftX = 0,
LeftY = 1,
RightX = 2,
RightY = 3,
TriggerLeft = 4,
TriggerRight = 5,
}
Variants§
Implementations§
source§impl Axis
impl Axis
sourcepub fn from_string(axis: &str) -> Option<Axis>
pub fn from_string(axis: &str) -> Option<Axis>
Return the Axis from a string description in the same format used by the game controller mapping strings.
sourcepub fn string(self) -> String
pub fn string(self) -> String
Return a string for a given axis in the same format using by the game controller mapping strings
pub fn from_ll(bitflags: SDL_GameControllerAxis) -> Option<Axis>
pub fn to_ll(&self) -> SDL_GameControllerAxis
Trait Implementations§
impl Copy for Axis
impl Eq for Axis
impl StructuralPartialEq for Axis
Auto Trait Implementations§
impl Freeze for Axis
impl RefUnwindSafe for Axis
impl Send for Axis
impl Sync for Axis
impl Unpin for Axis
impl UnwindSafe for Axis
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)