pub struct DeviceModelInfo {
pub entity_count: u8,
pub serial_number: Option<String>,
pub unit_id: [u8; 4],
pub transports: DeviceTransports,
pub model_ids: [u16; 3],
pub extended_model_id: u8,
}Expand description
HID++ DeviceInformation (feature 0x0003) snapshot used to identify a
device against external registries (e.g. the OpenLogi asset index).
model_ids is the per-transport PID array reported by the firmware,
ordered to match the transports flagged in Self::transports (USB,
eQuad, BTLE, Bluetooth) — slots that aren’t enabled stay 0. The Logi
Options+ asset registry’s modelId (e.g. "6b023") is the concatenation
of an extended-model byte and one of these PIDs, so callers usually want
to format extended_model_id + model_ids[N] to match.
Fields§
§entity_count: u8§serial_number: Option<String>HID++ DeviceInformation serial number, when the device supports the optional serial-number function.
unit_id: [u8; 4]§transports: DeviceTransports§model_ids: [u16; 3]§extended_model_id: u8Implementations§
Source§impl DeviceModelInfo
impl DeviceModelInfo
Sourcepub fn config_key(&self) -> String
pub fn config_key(&self) -> String
Stable identifier used to key per-device configuration (button bindings, etc.) and to look up assets in the OpenLogi asset registry.
Format: {extended_model_id:x}{model_ids[0]:04x} — the same string
the depot manifest.json uses for its modelId field. Example: an
MX Master 4 with extended_model_id = 0x02 and model_ids[0] = 0xb042
resolves to "2b042".
Trait Implementations§
Source§impl Clone for DeviceModelInfo
impl Clone for DeviceModelInfo
Source§fn clone(&self) -> DeviceModelInfo
fn clone(&self) -> DeviceModelInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeviceModelInfo
impl Debug for DeviceModelInfo
Source§impl<'de> Deserialize<'de> for DeviceModelInfo
impl<'de> Deserialize<'de> for DeviceModelInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for DeviceModelInfo
Source§impl PartialEq for DeviceModelInfo
impl PartialEq for DeviceModelInfo
Source§fn eq(&self, other: &DeviceModelInfo) -> bool
fn eq(&self, other: &DeviceModelInfo) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for DeviceModelInfo
impl Serialize for DeviceModelInfo
impl StructuralPartialEq for DeviceModelInfo
Auto Trait Implementations§
impl Freeze for DeviceModelInfo
impl RefUnwindSafe for DeviceModelInfo
impl Send for DeviceModelInfo
impl Sync for DeviceModelInfo
impl Unpin for DeviceModelInfo
impl UnsafeUnpin for DeviceModelInfo
impl UnwindSafe for DeviceModelInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.