pub struct RootFeature { /* private fields */ }Expand description
IRoot feature implementation.
Implementations§
Source§impl RootFeature
impl RootFeature
Sourcepub fn new(device_index: u8) -> Self
pub fn new(device_index: u8) -> Self
Creates a new root feature accessor.
§Arguments
device_index- Device index (0xFF for direct USB/Bluetooth)
Sourcepub async fn ping(&self, channel: &HidapiChannel) -> Result<ProtocolVersion>
pub async fn ping(&self, channel: &HidapiChannel) -> Result<ProtocolVersion>
Sourcepub async fn get_feature_index(
&self,
channel: &HidapiChannel,
feature_id: u16,
) -> Result<Option<u8>>
pub async fn get_feature_index( &self, channel: &HidapiChannel, feature_id: u16, ) -> Result<Option<u8>>
Gets the feature index for a given feature ID.
§Arguments
channel- HID channel to communicate overfeature_id- The feature ID to look up (e.g., 0x2201 for DPI)
§Returns
The feature index if found, or None if the feature is not supported.
§Errors
Returns an error if HID++ communication fails or the device returns an error (other than “unknown feature”).
Auto Trait Implementations§
impl Freeze for RootFeature
impl RefUnwindSafe for RootFeature
impl Send for RootFeature
impl Sync for RootFeature
impl Unpin for RootFeature
impl UnwindSafe for RootFeature
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