pub struct Device { /* private fields */ }Expand description
A struct representing an opened device
Dropping this struct will close the associated device
Implementations§
Source§impl Device
impl Device
Sourcepub fn read_input_report<'a>(
&'a self,
buf: &'a mut [u8],
) -> impl Future<Output = HidResult<usize>> + 'a
pub fn read_input_report<'a>( &'a self, buf: &'a mut [u8], ) -> impl Future<Output = HidResult<usize>> + 'a
Read a input report from this device
Sourcepub fn write_output_report<'a>(
&'a self,
buf: &'a [u8],
) -> impl Future<Output = HidResult<()>> + 'a
pub fn write_output_report<'a>( &'a self, buf: &'a [u8], ) -> impl Future<Output = HidResult<()>> + 'a
Write an output report to this device
Sourcepub fn info(&self) -> &DeviceInfo
pub fn info(&self) -> &DeviceInfo
Retrieves the DeviceInfo associated with this device
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