pub struct SmartShiftFeature { /* private fields */ }Expand description
SmartShift feature implementation.
Implementations§
Source§impl SmartShiftFeature
impl SmartShiftFeature
Sourcepub fn new(device_index: u8, feature_index: u8) -> Self
pub fn new(device_index: u8, feature_index: u8) -> Self
Creates a new SmartShift feature accessor.
§Arguments
device_index- Device index (0xFF for direct)feature_index- Feature index from root feature discovery
Sourcepub async fn get_status(
&self,
channel: &HidapiChannel,
) -> Result<SmartShiftConfig>
pub async fn get_status( &self, channel: &HidapiChannel, ) -> Result<SmartShiftConfig>
Sourcepub async fn set_status(
&self,
channel: &HidapiChannel,
config: &SmartShiftConfig,
) -> Result<()>
pub async fn set_status( &self, channel: &HidapiChannel, config: &SmartShiftConfig, ) -> Result<()>
Sourcepub async fn set_enabled(
&self,
channel: &HidapiChannel,
enabled: bool,
) -> Result<()>
pub async fn set_enabled( &self, channel: &HidapiChannel, enabled: bool, ) -> Result<()>
Sourcepub async fn set_threshold(
&self,
channel: &HidapiChannel,
threshold: u8,
) -> Result<()>
pub async fn set_threshold( &self, channel: &HidapiChannel, threshold: u8, ) -> Result<()>
Sourcepub async fn set_wheel_mode(
&self,
channel: &HidapiChannel,
mode: WheelMode,
) -> Result<()>
pub async fn set_wheel_mode( &self, channel: &HidapiChannel, mode: WheelMode, ) -> Result<()>
Sets the wheel mode directly (bypassing SmartShift).
§Errors
Returns an error if HID++ communication fails.
Auto Trait Implementations§
impl Freeze for SmartShiftFeature
impl RefUnwindSafe for SmartShiftFeature
impl Send for SmartShiftFeature
impl Sync for SmartShiftFeature
impl Unpin for SmartShiftFeature
impl UnwindSafe for SmartShiftFeature
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