pub struct Xbox360Wired<CL: Borrow<Client>> { /* private fields */ }
Expand description
A virtual Microsoft Xbox 360 Controller (wired).
Implementations§
Source§impl<CL: Borrow<Client>> Xbox360Wired<CL>
impl<CL: Borrow<Client>> Xbox360Wired<CL>
Sourcepub fn new(client: CL, id: TargetId) -> Xbox360Wired<CL>
pub fn new(client: CL, id: TargetId) -> Xbox360Wired<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.
Sourcepub fn get_user_index(&mut self) -> Result<u32, Error>
pub fn get_user_index(&mut self) -> Result<u32, Error>
Gets the user index of the device in XInput.
Trait Implementations§
Auto Trait Implementations§
impl<CL> Freeze for Xbox360Wired<CL>where
CL: Freeze,
impl<CL> RefUnwindSafe for Xbox360Wired<CL>where
CL: RefUnwindSafe,
impl<CL> Send for Xbox360Wired<CL>where
CL: Send,
impl<CL> Sync for Xbox360Wired<CL>where
CL: Sync,
impl<CL> Unpin for Xbox360Wired<CL>where
CL: Unpin,
impl<CL> UnwindSafe for Xbox360Wired<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