pub struct DeviceIdentity {
pub display_name: String,
pub model_info: Option<DeviceModelInfo>,
pub codename: Option<String>,
pub kind: DeviceKind,
pub capabilities: Capabilities,
}Expand description
Last-known identity of a device, captured while it was online so the UI can render its card and the correct config panels before any live HID++ probe completes — or while the device is asleep and can’t be probed at all.
Every field is a static property of the model, not of the current
connection: an MX Master 3S has adjustable DPI whether or not it is awake.
That is what makes this safe to persist — it never goes stale. It is also
free of any per-unit identifier (no serial number, no unit id), so caching
it adds no privacy surface beyond the config_key already used as the map
key. Persisting identity is what stops a sleeping/just-booted mouse from
vanishing from the device list (and losing its Pointer/Buttons panels)
until a cold probe happens to win its race — see issue #159.
Fields§
§display_name: StringThe name shown in the carousel, as resolved from the asset registry the last time the device was online.
model_info: Option<DeviceModelInfo>HID++ model identity from feature 0x0003, when available. Persisted so the GUI can resolve the same curated asset while the device is asleep.
codename: Option<String>Firmware codename, when available. Used as an asset-resolution hint and as a readable fallback for devices without curated model metadata.
kind: DeviceKindThe device’s resolved DeviceKind (asset registry preferred, HID++
classification as fallback).
capabilities: CapabilitiesConfiguration capabilities measured from the device’s HID++ feature table. This is the field that keeps a sleeping mouse’s panels visible.
Trait Implementations§
Source§impl Clone for DeviceIdentity
impl Clone for DeviceIdentity
Source§fn clone(&self) -> DeviceIdentity
fn clone(&self) -> DeviceIdentity
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 DeviceIdentity
impl Debug for DeviceIdentity
Source§impl<'de> Deserialize<'de> for DeviceIdentity
impl<'de> Deserialize<'de> for DeviceIdentity
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 DeviceIdentity
Source§impl PartialEq for DeviceIdentity
impl PartialEq for DeviceIdentity
Source§fn eq(&self, other: &DeviceIdentity) -> bool
fn eq(&self, other: &DeviceIdentity) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for DeviceIdentity
impl Serialize for DeviceIdentity
impl StructuralPartialEq for DeviceIdentity
Auto Trait Implementations§
impl Freeze for DeviceIdentity
impl RefUnwindSafe for DeviceIdentity
impl Send for DeviceIdentity
impl Sync for DeviceIdentity
impl Unpin for DeviceIdentity
impl UnsafeUnpin for DeviceIdentity
impl UnwindSafe for DeviceIdentity
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.