[−][src]Struct gilrs_core::Gilrs
Struct used to manage gamepads and retrieve events.
Methods
impl Gilrs
[src]
pub fn new() -> Result<Self, Error>
[src]
pub fn next_event(&mut self) -> Option<Event>
[src]
Returns oldest event or None
if all events were processed.
pub fn gamepad(&self, id: usize) -> Option<&Gamepad>
[src]
Borrows Gamrpad
or return None
if index is invalid. Returned gamepad may be disconnected.
pub fn last_gamepad_hint(&self) -> usize
[src]
Returns id greater than id of last connected gamepad. The returned value is only hint and may be much larger than number of observed gamepads. For example, it may return maximum number of connected gamepads on platforms when this limit is small.
gamepad(id)
should return Some
if using id that is smaller than value returned from this
function.
Trait Implementations
Auto Trait Implementations
impl !Send for Gilrs
impl !Sync for Gilrs
impl Unpin for Gilrs
impl UnwindSafe for Gilrs
impl RefUnwindSafe for Gilrs
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,