pub struct Device { /* private fields */ }Expand description
A USB device, you must open an Interface to perform transfers.
Trait Implementations§
Source§impl UsbDevice for Device
impl UsbDevice for Device
Source§async fn open_interface(&self, number: u8) -> Result<Self::Interface, Error>
async fn open_interface(&self, number: u8) -> Result<Self::Interface, Error>
Open a specific interface of the device
Source§async fn detach_and_open_interface(
&self,
number: u8,
) -> Result<Self::Interface, Error>
async fn detach_and_open_interface( &self, number: u8, ) -> Result<Self::Interface, Error>
Open a specific interface of the device, detaching any
kernel drivers and claiming it. Read more
Source§async fn reset(&self) -> Result<(), Error>
async fn reset(&self) -> Result<(), Error>
Reset the device, which causes it to no longer be usable. You must
request a new device with crate::get_device
Source§async fn forget(&self) -> Result<(), Error>
async fn forget(&self) -> Result<(), Error>
Remove the device from the paired devices list, causing it to no longer be usable. You must request to reconnect using crate::get_device Read more
Source§async fn product_id(&self) -> u16
async fn product_id(&self) -> u16
16 bit device Product ID
Source§async fn manufacturer_string(&self) -> Option<String>
async fn manufacturer_string(&self) -> Option<String>
Get the manufacturer string string of the device, if available without device IO Read more
Source§async fn product_string(&self) -> Option<String>
async fn product_string(&self) -> Option<String>
Get the product string of the device, if available without device IO
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnwindSafe for Device
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