Crate hidg_core

Source
Expand description

§HID Gadget Emulation in Rust

github crate docs MIT CI

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
KeyStateChanges
Changes between keyboard input reports
Keyboard
Keyboard HID class
KeyboardInput
Keyboard input report
KeyboardOutput
Keyboard output report
LedStateChanges
Changes between keyboard output reports
Leds
LED mask
Modifiers
Modifier mask
Mouse
Mouse HID class
MouseInput
Mouse input report
MouseInputChanges
Changes between mouse input reports
MouseOutput
Keyboard output report
StateChange
Key/button/LED state change event
Unknown
Unknown error
ValueChange
Pointer/cursor position change event

Enums§

Button
Button code
Key
Key code
Led
LED code
MouseInputChange
Change between mouse input reports

Traits§

AsDevicePath
Device path trait
Class
Device class trait

Functions§

check_read
Check read report length
check_write
Check write report length

Type Aliases§

Result
A specialized Result type for I/O operations.