pub struct Gamepad {
pub slot: GamepadSlot,
}
Fields§
§slot: GamepadSlot
Implementations§
Source§impl 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 Freeze for Gamepad
impl RefUnwindSafe for Gamepad
impl Send for Gamepad
impl Sync for Gamepad
impl Unpin for Gamepad
impl UnwindSafe for Gamepad
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more