pub struct HidInterfaceSummary {
pub vendor_id: u16,
pub product_id: u16,
pub release_number: u16,
pub usage_page: u16,
pub usage: u16,
pub interface_number: i32,
pub manufacturer: Option<String>,
pub product: Option<String>,
pub serial_number_present: bool,
}Expand description
Non-sensitive information needed to match a HID interface to the registry.
Device paths and serial-number values are deliberately excluded because they can contain stable identifiers. Callers only learn whether a serial exists.
接口摘要仅保留匹配清单所需的非敏感信息。不包含设备路径或序列号值,只报告序列号是否存在。
Fields§
§vendor_id: u16§product_id: u16§release_number: u16§usage_page: u16§usage: u16§interface_number: i32§manufacturer: Option<String>§product: Option<String>§serial_number_present: boolImplementations§
Source§impl HidInterfaceSummary
impl HidInterfaceSummary
Sourcepub const fn collection_kind(&self) -> HidCollectionKind
pub const fn collection_kind(&self) -> HidCollectionKind
Classify the HID collection using descriptor data only.
仅根据描述符数据判断 HID 集合类型。
Sourcepub const fn is_vendor_defined_collection(&self) -> bool
pub const fn is_vendor_defined_collection(&self) -> bool
Whether this descriptor is a possible vendor-command collection.
This is only a discovery hint. It does not authorize opening the interface or sending a report; a curated manifest must still match it.
可能的厂商命令集合仅是发现提示,不授权打开接口或发送报文,仍须匹配已审阅清单。
Trait Implementations§
Source§impl Clone for HidInterfaceSummary
impl Clone for HidInterfaceSummary
Source§fn clone(&self) -> HidInterfaceSummary
fn clone(&self) -> HidInterfaceSummary
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HidInterfaceSummary
impl Debug for HidInterfaceSummary
impl Eq for HidInterfaceSummary
Source§impl Ord for HidInterfaceSummary
impl Ord for HidInterfaceSummary
Source§fn cmp(&self, other: &HidInterfaceSummary) -> Ordering
fn cmp(&self, other: &HidInterfaceSummary) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for HidInterfaceSummary
impl PartialEq for HidInterfaceSummary
Source§fn eq(&self, other: &HidInterfaceSummary) -> bool
fn eq(&self, other: &HidInterfaceSummary) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for HidInterfaceSummary
impl PartialOrd for HidInterfaceSummary
impl StructuralPartialEq for HidInterfaceSummary
Auto Trait Implementations§
impl Freeze for HidInterfaceSummary
impl RefUnwindSafe for HidInterfaceSummary
impl Send for HidInterfaceSummary
impl Sync for HidInterfaceSummary
impl Unpin for HidInterfaceSummary
impl UnsafeUnpin for HidInterfaceSummary
impl UnwindSafe for HidInterfaceSummary
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