Enum sdl2::controller::Axis
source · #[repr(i32)]
pub enum Axis {
LeftX,
LeftY,
RightX,
RightY,
TriggerLeft,
TriggerRight,
}
Variants
LeftX
LeftY
RightX
RightY
TriggerLeft
TriggerRight
Implementations
sourceimpl 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 StructuralEq for Axis
impl StructuralPartialEq for Axis
Auto Trait Implementations
impl RefUnwindSafe for Axis
impl Send for Axis
impl Sync for Axis
impl Unpin for Axis
impl UnwindSafe for Axis
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more