Struct gilrs_core::Gilrs

source ·
pub struct Gilrs { /* private fields */ }
Expand description

Struct used to manage gamepads and retrieve events.

Implementations§

Returns oldest event or None if all events were processed.

Borrows Gamepad or return None if index is invalid. Returned gamepad may be disconnected.

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§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.