pub struct FeatureSetFeature { /* private fields */ }Expand description
Implements the FeatureSet / 0x0001 feature.
This feature is primarily used to collect all features supported by the
device. To achieve this, call Self::count to retrieve the amount of
supported features (excluding the root feature). Then call
Self::get_feature for every i in 1..=count (1-based, as accessing the
root feature is not allowed).
Implementations§
Source§impl FeatureSetFeature
impl FeatureSetFeature
Sourcepub async fn count(&self) -> Result<u8, Hidpp20Error>
pub async fn count(&self) -> Result<u8, Hidpp20Error>
Retrieves the amount of features supported by the device, not including the root feature.
Sourcepub async fn get_feature(
&self,
index: u8,
) -> Result<FeatureInformation, Hidpp20Error>
pub async fn get_feature( &self, index: u8, ) -> Result<FeatureInformation, Hidpp20Error>
Retrieves the information about a specific feature based on its index in the feature table.
Feature index 0 for the root feature is not allowed.
Trait Implementations§
Source§impl Clone for FeatureSetFeature
impl Clone for FeatureSetFeature
Source§fn clone(&self) -> FeatureSetFeature
fn clone(&self) -> FeatureSetFeature
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CreatableFeature for FeatureSetFeature
impl CreatableFeature for FeatureSetFeature
Source§const STARTING_VERSION: u8 = 0
const STARTING_VERSION: u8 = 0
The version of the feature the implementation starts to support.
impl Feature for FeatureSetFeature
Auto Trait Implementations§
impl !RefUnwindSafe for FeatureSetFeature
impl !UnwindSafe for FeatureSetFeature
impl Freeze for FeatureSetFeature
impl Send for FeatureSetFeature
impl Sync for FeatureSetFeature
impl Unpin for FeatureSetFeature
impl UnsafeUnpin for FeatureSetFeature
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