pub struct Gamepad {
pub slot: GamepadSlot,
}
Fields
slot: GamepadSlot
Implementations
sourceimpl Gamepad
impl Gamepad
sourcepub const fn new(slot: GamepadSlot) -> Gamepad
pub const fn new(slot: GamepadSlot) -> Gamepad
Construct a new Gamepad for the given slot
sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Check whether this gamepad is connected
sourcepub fn read_state(&self) -> GamepadState
pub fn read_state(&self) -> GamepadState
Read the state of this gamepad
sourcepub fn set_rumble(&self, enable: bool)
pub fn set_rumble(&self, enable: bool)
Set this gamepad’s vibration on or off
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
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