pub struct NodeInfo {
pub id: NodeId,
pub vendor_id: u16,
pub product_id: u16,
pub usage_page: u16,
pub usage_id: u16,
pub name: String,
pub manufacturer: Option<String>,
pub serial_number: Option<String>,
}Expand description
One HID node as the backend reports it, before anything is opened.
These are the fields enumeration filters on and routes address by — the intersection every HID backend can supply, which is also all the layers above the transport ever read.
Fields§
§id: NodeIdBackend-assigned identity of this node.
vendor_id: u16HID vendor id of the device’s manufacturer.
product_id: u16HID product id.
usage_page: u16HID usage page of this node’s top-level collection.
usage_id: u16HID usage id of this node’s top-level collection.
name: StringHuman-readable device name.
manufacturer: Option<String>Human-readable manufacturer, when the backend reports one.
serial_number: Option<String>Device serial number, when the device has one and the backend can read it.
Implementations§
Source§impl NodeInfo
impl NodeInfo
Sourcepub fn identity(&self) -> String
pub fn identity(&self) -> String
Stable opaque identity used by raw-device routes.
Prefers the HID serial; otherwise retains the backend’s node id as a runtime identity. The latter is deliberately not a cross-machine portable key, but it is stronger than enumeration order and lets duplicate nodes be rejected deterministically.