pub struct HiResWheelFeature { /* private fields */ }Expand description
Implements the HiResWheel / 0x2121 feature.
The analytics part of the feature is not implemented here as its data structure lacks any documentation.
Implementations§
Source§impl HiResWheelFeature
impl HiResWheelFeature
Sourcepub async fn get_wheel_capabilities(
&self,
) -> Result<WheelCapabilities, Hidpp20Error>
pub async fn get_wheel_capabilities( &self, ) -> Result<WheelCapabilities, Hidpp20Error>
Retrieves the capabilities of the hi-res wheel and this feature.
Sourcepub async fn get_wheel_mode(&self) -> Result<WheelMode, Hidpp20Error>
pub async fn get_wheel_mode(&self) -> Result<WheelMode, Hidpp20Error>
Retrieves the current mode of the hi-res wheel.
Sourcepub async fn set_wheel_mode(
&self,
target: WheelEventTarget,
resolution: WheelResolution,
inverted: bool,
) -> Result<WheelMode, Hidpp20Error>
pub async fn set_wheel_mode( &self, target: WheelEventTarget, resolution: WheelResolution, inverted: bool, ) -> Result<WheelMode, Hidpp20Error>
Sets the mode of the hi-res wheel.
Setting the bit to control analytics collection is not supported in this
feature implementation as the analytics data structure is completely
undocumented.
If this is implemented in the future, a new implementation will do so to
not break this one.
Sourcepub async fn get_ratchet_switch_state(
&self,
) -> Result<WheelRatchetState, Hidpp20Error>
pub async fn get_ratchet_switch_state( &self, ) -> Result<WheelRatchetState, Hidpp20Error>
Retrieves the current state of the ratchet switch.
Trait Implementations§
Source§impl CreatableFeature for HiResWheelFeature
impl CreatableFeature for HiResWheelFeature
Source§const STARTING_VERSION: u8 = 0
const STARTING_VERSION: u8 = 0
The version of the feature the implementation starts to support.
Source§impl EmittingFeature<HiResWheelEvent> for HiResWheelFeature
impl EmittingFeature<HiResWheelEvent> for HiResWheelFeature
Source§fn listen(&self) -> Receiver<HiResWheelEvent>
fn listen(&self) -> Receiver<HiResWheelEvent>
Creates a receiver that is being notified whenever a new event of type
T is emitted by the feature.impl Feature for HiResWheelFeature
Auto Trait Implementations§
impl !RefUnwindSafe for HiResWheelFeature
impl !UnwindSafe for HiResWheelFeature
impl Freeze for HiResWheelFeature
impl Send for HiResWheelFeature
impl Sync for HiResWheelFeature
impl Unpin for HiResWheelFeature
impl UnsafeUnpin for HiResWheelFeature
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