pub struct OnboardProfilesFeature { /* private fields */ }Expand description
On-board Profiles feature implementation.
Implementations§
Source§impl OnboardProfilesFeature
impl OnboardProfilesFeature
Sourcepub fn new(device_index: u8, feature_index: u8) -> Self
pub fn new(device_index: u8, feature_index: u8) -> Self
Creates a new on-board profiles feature accessor.
§Arguments
device_index- Device index (0xFF for direct)feature_index- Feature index from root feature discovery
Sourcepub async fn get_profiles_description(
&self,
channel: &HidapiChannel,
) -> Result<ProfilesDescription>
pub async fn get_profiles_description( &self, channel: &HidapiChannel, ) -> Result<ProfilesDescription>
Gets the profiles description (device capabilities).
§Errors
Returns an error if HID++ communication fails.
Sourcepub async fn get_onboard_mode(
&self,
channel: &HidapiChannel,
) -> Result<OnboardMode>
pub async fn get_onboard_mode( &self, channel: &HidapiChannel, ) -> Result<OnboardMode>
Sourcepub async fn set_onboard_mode(
&self,
channel: &HidapiChannel,
mode: OnboardMode,
) -> Result<()>
pub async fn set_onboard_mode( &self, channel: &HidapiChannel, mode: OnboardMode, ) -> Result<()>
Sourcepub async fn get_current_profile(&self, channel: &HidapiChannel) -> Result<u8>
pub async fn get_current_profile(&self, channel: &HidapiChannel) -> Result<u8>
Gets the current active profile index.
Profile indices are 1-based (1 = first profile).
§Errors
Returns an error if HID++ communication fails.
Sourcepub async fn set_current_profile(
&self,
channel: &HidapiChannel,
profile_index: u8,
) -> Result<()>
pub async fn set_current_profile( &self, channel: &HidapiChannel, profile_index: u8, ) -> Result<()>
Sourcepub async fn get_current_dpi_index(&self, channel: &HidapiChannel) -> Result<u8>
pub async fn get_current_dpi_index(&self, channel: &HidapiChannel) -> Result<u8>
Gets the current DPI index within the active profile.
DPI indices are 0-based (0 = first DPI slot).
§Errors
Returns an error if HID++ communication fails.
Sourcepub async fn set_current_dpi_index(
&self,
channel: &HidapiChannel,
dpi_index: u8,
) -> Result<()>
pub async fn set_current_dpi_index( &self, channel: &HidapiChannel, dpi_index: u8, ) -> Result<()>
Auto Trait Implementations§
impl Freeze for OnboardProfilesFeature
impl RefUnwindSafe for OnboardProfilesFeature
impl Send for OnboardProfilesFeature
impl Sync for OnboardProfilesFeature
impl Unpin for OnboardProfilesFeature
impl UnwindSafe for OnboardProfilesFeature
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