pub struct Device { /* private fields */ }
Implementations§
source§impl Device
impl Device
pub fn pid(&self) -> u16
pub fn vid(&self) -> u16
pub async fn serial_number(&self) -> impl Future<Output = Result<String, Error>>
pub fn config_list(&self) -> Result<Vec<ConfigDescriptor, Global>, Error>
pub fn get_config(&self) -> Result<ConfigDescriptor, Error>
pub fn set_config(&self, config: ConfigDescriptor) -> Result<(), Error>
pub fn set_config_by_value(&self, config_value: u8) -> Result<(), Error>
pub fn claim_interface_by_num(&self, num: usize) -> Result<Interface, Error>
pub fn claim_interface( &self, interface: InterfaceDescriptor ) -> Result<Interface, Error>
pub async fn control_transfer_in( &self, recipient: UsbControlRecipient, transfer_type: UsbControlTransferType, request: u8, value: u16, index: u16, timeout: Duration, capacity: usize ) -> impl Future<Output = Result<Request, Error>>
pub async fn control_transfer_out( &self, recipient: UsbControlRecipient, transfer_type: UsbControlTransferType, request: u8, value: u16, index: u16, timeout: Duration, src: &mut [u8] ) -> impl Future<Output = Result<Request, Error>>
pub fn speed(&self) -> Result<Speed, Error>
pub fn bcd_usb(&self) -> u16
pub fn bcd_usb_version(&self) -> Vec<u16, Global>
pub fn device_class(&self) -> DeviceClass
pub fn device_subclass(&self) -> DeviceClass
pub fn device_protocol(&self) -> DeviceClass
pub fn max_packet_size_0(&self) -> usize
pub fn bcd_device(&self) -> u16
pub fn bcd_device_version(&self) -> Vec<u16, Global>
pub fn manufacturer(&self) -> Result<String, Error>
pub fn product(&self) -> Result<String, Error>
pub fn request_channel(&self, buffer: usize) -> (RequestSender, RequestReceiver)
Trait Implementations§
Auto Trait Implementations§
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