[−][src]Struct gilrs_core::Gamepad
Provides information about gamepad.
Implementations
impl Gamepad[src]
pub fn name(&self) -> &str[src]
Returns name of gamepad.
pub fn is_connected(&self) -> bool[src]
Returns true if gamepad is connected.
pub fn uuid(&self) -> [u8; 16][src]
Returns UUID that represents gamepad model.
Returned UUID should be the same as SLD2 uses. If platform does not provide any method to distinguish between gamepad models, nil UUID is returned.
It is recommended to process with the UUID crate.
Use Uuid::from_bytes method to create a Uuid from the returned bytes.
pub fn power_info(&self) -> PowerInfo[src]
Returns device's power supply state.
pub fn is_ff_supported(&self) -> bool[src]
Returns true if force feedback is supported by device,
pub fn ff_device(&self) -> Option<FfDevice>[src]
Creates FfDevice corresponding to this gamepad.
pub fn buttons(&self) -> &[EvCode][src]
Returns slice with EvCodes that may appear in button related events.
pub fn axes(&self) -> &[EvCode][src]
Returns slice with EvCodes that may appear in axis related events.
pub fn axis_info(&self, nec: EvCode) -> Option<&AxisInfo>[src]
Returns information about specific axis. None may be returned if device doesn't have axis
with provided EvCode.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Gamepad
impl Send for Gamepad
impl Sync for Gamepad
impl Unpin for Gamepad
impl UnwindSafe for Gamepad
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, 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>,