pub struct SmartShiftFeature { /* private fields */ }Expand description
Implements the SmartShift / 0x2110 feature.
Implementations§
Source§impl SmartShiftFeature
impl SmartShiftFeature
Sourcepub async fn get_ratchet_control_mode(
&self,
) -> Result<RatchetControlMode, Hidpp20Error>
pub async fn get_ratchet_control_mode( &self, ) -> Result<RatchetControlMode, Hidpp20Error>
Retrieves the current ratchet control mode.
RatchetControlMode::wheel_mode will only reflect the value set
either by software or the wheel mode button. It will not provide
information about whether the wheel is in auto-disengaged mode.
Sourcepub async fn set_ratchet_control_mode(
&self,
wheel_mode: Option<WheelMode>,
auto_disengage: Option<u8>,
auto_disengage_default: Option<u8>,
) -> Result<(), Hidpp20Error>
pub async fn set_ratchet_control_mode( &self, wheel_mode: Option<WheelMode>, auto_disengage: Option<u8>, auto_disengage_default: Option<u8>, ) -> Result<(), Hidpp20Error>
Sets the ratchet control mode.
For auto_disengage (and auto_disengage_default respectively), the
values 0x01..=0xfe correspond to the amount of quarter-turns the wheel
has to make per second for the wheel to disengage.
0xff enables permanent ratchet mode.
All values are optional and will stay as they are if provided with
None.
For auto_disengage and auto_disengange_default, 0 will have the
same effect as None.
Trait Implementations§
Source§impl CreatableFeature for SmartShiftFeature
impl CreatableFeature for SmartShiftFeature
Source§const STARTING_VERSION: u8 = 0
const STARTING_VERSION: u8 = 0
The version of the feature the implementation starts to support.
impl Feature for SmartShiftFeature
Auto Trait Implementations§
impl Freeze for SmartShiftFeature
impl !RefUnwindSafe for SmartShiftFeature
impl Send for SmartShiftFeature
impl Sync for SmartShiftFeature
impl Unpin for SmartShiftFeature
impl UnsafeUnpin 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