pub struct Device { /* private fields */ }Implementations§
Source§impl Device
impl Device
pub fn product_id(&self) -> u16
pub fn vendor_id(&self) -> u16
pub fn slot_id(&self) -> u8
pub async fn claim_interface( &mut self, interface: u8, alternate: u8, ) -> Result<(), USBError>
pub fn descriptor(&self) -> &DeviceDescriptor
pub fn configurations(&self) -> &[ConfigurationDescriptor]
pub fn manufacturer(&self) -> Option<&str>
pub async fn set_configuration(&mut self, configuration_value: u8) -> Result
pub fn ep_ctrl(&mut self) -> &mut EndpointControl
pub fn lang_id(&self) -> LanguageId
pub fn set_lang_id(&mut self, lang_id: LanguageId)
pub async fn string_descriptor(&mut self, index: u8) -> Result<String, USBError>
pub async fn control_in( &mut self, param: ControlSetup, buff: &mut [u8], ) -> Result<usize, TransferError>
pub async fn control_out( &mut self, param: ControlSetup, buff: &[u8], ) -> Result<usize, TransferError>
pub async fn update_hub(&mut self, params: HubParams) -> Result<(), USBError>
pub async fn current_configuration_descriptor( &mut self, ) -> Result<ConfigurationDescriptor, USBError>
pub async fn get_endpoint( &mut self, address: u8, ) -> Result<EndpointKind, USBError>
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