Skip to main content

ReprogControlsFeature

Struct ReprogControlsFeature 

Source
pub struct ReprogControlsFeature { /* private fields */ }
Expand description

Implements the SpecialKeysMseButtons / 0x1b04 feature.

Implementations§

Source§

impl ReprogControlsFeature

Source

pub async fn get_count(&self) -> Result<u8, Hidpp20Error>

Returns the number of rows in the control ID table.

Source

pub async fn get_cid_info(&self, index: u8) -> Result<CidInfo, Hidpp20Error>

Returns one row from the control ID table.

Source

pub async fn get_cid_reporting( &self, cid: ControlId, ) -> Result<CidReporting, Hidpp20Error>

Returns the current reporting/remapping state for cid.

Source

pub async fn set_cid_reporting( &self, cid: ControlId, change: CidReportingChange, ) -> Result<CidReportingChangeEcho, Hidpp20Error>

Applies reporting/remapping changes for cid.

Optional boolean fields in CidReportingChange map to the corresponding *-valid bit in Logitech’s packet. Fields set to None are left unchanged by the device. Remapping is carried as a value field rather than a valid/value pair; None sends the documented 0 value.

Source

pub async fn get_capabilities( &self, ) -> Result<ReprogControlsCapabilities, Hidpp20Error>

Returns feature-level capabilities.

This function exists on v6 devices. Older firmware may return InvalidFunctionId.

Source

pub async fn reset_all_cid_report_settings(&self) -> Result<(), Hidpp20Error>

Resets all diverted or remapped control settings.

This function exists on v6 devices that report ReprogControlsCapabilities::reset_all_cid_report_settings.

Trait Implementations§

Source§

impl CreatableFeature for ReprogControlsFeature

Source§

const ID: u16 = 0x1b04

The protocol ID of the implemented feature.
Source§

const STARTING_VERSION: u8 = 0

The version of the feature the implementation starts to support.
Source§

fn new(chan: Arc<HidppChannel>, device_index: u8, feature_index: u8) -> Self

Creates a new instance of the feature implementation.
Source§

impl EmittingFeature<ReprogControlsEvent> for ReprogControlsFeature

Source§

fn listen(&self) -> Receiver<ReprogControlsEvent>

Creates a receiver that is being notified whenever a new event of type T is emitted by the feature.
Source§

impl Feature for ReprogControlsFeature

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V