[−][src]Struct sdl2::JoystickSubsystem
Methods
impl JoystickSubsystem
[src]
pub fn num_joysticks(&self) -> Result<u32, String>
[src]
Retrieve the total number of attached joysticks and controllers identified by SDL.
pub fn open(&self, joystick_index: u32) -> Result<Joystick, IntegerOrSdlError>
[src]
Attempt to open the joystick at index joystick_index
and return it.
pub fn name_for_index(
&self,
joystick_index: u32
) -> Result<String, IntegerOrSdlError>
[src]
&self,
joystick_index: u32
) -> Result<String, IntegerOrSdlError>
Return the name of the joystick at index joystick_index
.
pub fn device_guid(
&self,
joystick_index: u32
) -> Result<Guid, IntegerOrSdlError>
[src]
&self,
joystick_index: u32
) -> Result<Guid, IntegerOrSdlError>
Get the GUID for the joystick at index joystick_index
pub fn set_event_state(&self, state: bool)
[src]
If state is true
joystick events are processed, otherwise
they're ignored.
pub fn event_state(&self) -> bool
[src]
Return true
if joystick events are processed.
pub fn update(&self)
[src]
Force joystick update when not using the event loop
impl JoystickSubsystem
[src]
Trait Implementations
impl Clone for JoystickSubsystem
[src]
fn clone(&self) -> JoystickSubsystem
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for JoystickSubsystem
[src]
Auto Trait Implementations
impl !RefUnwindSafe for JoystickSubsystem
impl !Send for JoystickSubsystem
impl !Sync for JoystickSubsystem
impl Unpin for JoystickSubsystem
impl !UnwindSafe for JoystickSubsystem
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,