Skip to main content

hid_types/
lib.rs

1//! # Rust types for working with USB HID report descriptors.
2//!
3//! This crate contains Rust types for encoding and decoding USB HID (Human Interface Device)
4//! report descriptors. It contains all of the constants from the HID specifications, as well
5//! as code to encode and decode binary report descriptors.
6//!
7//! It's mostly intended for use by the `hid-descriptor` and `hid-decode` crates.
8//!
9//! The [`id`] module contains the numeric identifiers used in HID report descriptors.
10//! The [`item`] module contains types that represent fully-populated descriptor items.
11//!
12//! See [Device Class Definition for Human Interface Devices](https://www.usb.org/document-library/device-class-definition-hid-111)
13//! for a detailed description of HID report descriptors.
14
15#![warn(clippy::print_stderr, clippy::print_stdout, clippy::dbg_macro)]
16#![warn(clippy::todo)]
17#![warn(missing_docs)]
18#![no_std]
19
20#[cfg(feature = "std")]
21extern crate std;
22
23pub mod id;
24
25pub mod encoding;
26pub mod item;
27
28pub use id::Ident;