pub struct GcAdapter<T: AdapterHardware> { /* private fields */ }
Expand description
A connection to a gamecube adapter
Implementations§
Source§impl<T: AdapterHardware> GcAdapter<T>
impl<T: AdapterHardware> GcAdapter<T>
Sourcepub fn set_rumble(&mut self, ports: [bool; 4])
pub fn set_rumble(&mut self, ports: [bool; 4])
Set rumble for all 4 ports at once
Sourcepub fn refresh_inputs(&mut self)
pub fn refresh_inputs(&mut self)
Refresh the set of inputs by polling the adapter 10 times, this ensures the results of
read_controllers
is current.
Sourcepub fn read_controllers(&mut self) -> [Controller; 4]
pub fn read_controllers(&mut self) -> [Controller; 4]
Read the current state of all the controllers plugged into the adapter
Sourcepub fn new(usb: T) -> Self
pub fn new(usb: T) -> Self
Creates a new GcAdapter
from a USB connection that implements
AdapterHardware
.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for GcAdapter<T>where
T: Freeze,
impl<T> RefUnwindSafe for GcAdapter<T>where
T: RefUnwindSafe,
impl<T> Send for GcAdapter<T>where
T: Send,
impl<T> Sync for GcAdapter<T>where
T: Sync,
impl<T> Unpin for GcAdapter<T>where
T: Unpin,
impl<T> UnwindSafe for GcAdapter<T>where
T: UnwindSafe,
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