pub trait AsyncHidFeatureHandle {
// Required methods
fn read_feature_report<'a>(
&'a mut self,
buf: &'a mut [u8],
) -> impl Future<Output = HidResult<usize>> + Send + 'a;
fn write_feature_report<'a>(
&'a mut self,
buf: &'a [u8],
) -> impl Future<Output = HidResult<()>> + Send + 'a;
}Expand description
Provides functionality for reading and writing feature reports from HID devices
Required Methods§
Sourcefn read_feature_report<'a>(
&'a mut self,
buf: &'a mut [u8],
) -> impl Future<Output = HidResult<usize>> + Send + 'a
fn read_feature_report<'a>( &'a mut self, buf: &'a mut [u8], ) -> impl Future<Output = HidResult<usize>> + Send + 'a
Read a feature report from a HID device
The submitted buffer must be big enough to contain the entire report or the report will be truncated If the device uses numbered report the first byte will contain the report id
Sourcefn write_feature_report<'a>(
&'a mut self,
buf: &'a [u8],
) -> impl Future<Output = HidResult<()>> + Send + 'a
fn write_feature_report<'a>( &'a mut self, buf: &'a [u8], ) -> impl Future<Output = HidResult<()>> + Send + 'a
Write a feature report to a HID device
If the submitted report is larger that what the device expects it might be truncated depending on the backend The first byte must be the report id. If the device does not use numbered report the first by must be set to 0x0
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.