pub struct Device {
pub descriptor: DeviceDescriptor,
pub configurations: Vec<ConfigurationDescriptor>,
pub manufacturer_string: String,
pub product_string: String,
pub serial_number_string: String,
/* private fields */
}Fields§
§descriptor: DeviceDescriptor§configurations: Vec<ConfigurationDescriptor>§manufacturer_string: String§product_string: String§serial_number_string: StringImplementations§
Source§impl Device
impl Device
pub async fn set_configuration( &mut self, configuration: u8, ) -> Result<(), USBError>
pub async fn get_configuration(&mut self) -> Result<u8, USBError>
pub async fn claim_interface( &mut self, interface: u8, alternate: u8, ) -> Result<Interface, USBError>
pub async fn current_configuration_descriptor( &mut self, ) -> Result<ConfigurationDescriptor, USBError>
pub fn class(&self) -> Class
pub fn vendor_id(&self) -> u16
pub fn product_id(&self) -> u16
Trait Implementations§
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