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).
The table is fixed for the life of the connection: no write changes what
either function answers. Both therefore adopt a reply still owed to an
abandoned identical ask (AbandonedReply::AdoptIdentical), so a walk
that re-asks for an entry the link dropped is not held for the channel’s
stale-reply grace on every retry — the one place that trade is sound.
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.