Expand description
§HID Gadget Emulation in Rust
Rust crate for interfacing with Linux HID Gadget devices (/dev/hidgX).
Since all functionality is dependent on Linux function calls, this crate only compiles for Linux systems.
§Crates
- hidg-core - core abstractions and low level interface (not for end users)
- hidg - std interface which supports synchronous operation only
- tokio-hidg - async interface for tokio async runtime
- async-hidg - async interface for other async runtimes
§Features
- fromstr - implements core::str::FromStr implementation for some types
- display - implements std::fmt::Display implementation for some types
- phf - use phf in core::str::FromStr trait implementations
- serde - enables serde support for some types
- keyboard - enables keyboard class support
- mouse - enables mouse class support
Structs§
- Buttons
- Button mask
- Error
- The error type for I/O operations of the
Read
,Write
,Seek
, and associated traits. - Internal
- Wrapper to hide internals
- KeyState
Changes - Changes between keyboard input reports
- Keyboard
- Keyboard HID class
- Keyboard
Input - Keyboard input report
- Keyboard
Output - Keyboard output report
- LedState
Changes - Changes between keyboard output reports
- Leds
- LED mask
- Modifiers
- Modifier mask
- Mouse
- Mouse HID class
- Mouse
Input - Mouse input report
- Mouse
Input Changes - Changes between mouse input reports
- Mouse
Output - Keyboard output report
- State
Change - Key/button/LED state change event
- Unknown
- Unknown error
- Value
Change - Pointer/cursor position change event
Enums§
- Button
- Button code
- Key
- Key code
- Led
- LED code
- Mouse
Input Change - Change between mouse input reports
Traits§
- AsDevice
Path - Device path trait
- Class
- Device class trait
Functions§
- check_
read - Check read report length
- check_
write - Check write report length