pub struct DualShock4Wired<CL: Borrow<Client>> { /* private fields */ }
Expand description
A virtual Sony DualShock 4 (wired).
Implementations§
Source§impl<CL: Borrow<Client>> DualShock4Wired<CL>
impl<CL: Borrow<Client>> DualShock4Wired<CL>
Sourcepub fn new(client: CL, id: TargetId) -> DualShock4Wired<CL>
pub fn new(client: CL, id: TargetId) -> DualShock4Wired<CL>
Creates a new instance.
Sourcepub fn is_attached(&self) -> bool
pub fn is_attached(&self) -> bool
Returns if the controller is plugged in.
Sourcepub fn wait_ready(&mut self) -> Result<(), Error>
pub fn wait_ready(&mut self) -> Result<(), Error>
Waits until the virtual controller is ready.
Any updates submitted before the virtual controller is ready may return an error.
Trait Implementations§
Auto Trait Implementations§
impl<CL> Freeze for DualShock4Wired<CL>where
CL: Freeze,
impl<CL> RefUnwindSafe for DualShock4Wired<CL>where
CL: RefUnwindSafe,
impl<CL> Send for DualShock4Wired<CL>where
CL: Send,
impl<CL> Sync for DualShock4Wired<CL>where
CL: Sync,
impl<CL> Unpin for DualShock4Wired<CL>where
CL: Unpin,
impl<CL> UnwindSafe for DualShock4Wired<CL>where
CL: 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