[][src]Crate hidapi

This crate provides a rust abstraction over the features of the C library hidapi by signal11.

Usage

This crate is on crates.io and can be used by adding hidapi to the dependencies in your project's Cargo.toml.

Example

extern crate hidapi;

use hidapi::HidApi;

fn main() {
    println!("Printing all available hid devices:");

    match HidApi::new() {
        Ok(api) => {
            for device in api.devices() {
                println!("{:#?}", device);
            }
        },
        Err(e) => {
            eprintln!("Error: {}", e);
        },
    }
}

Structs

DeviceInfo

Device information. Use accessors to extract information about Hid devices.

HidApi

Object for handling hidapi context and implementing RAII for it. Only one instance can exist at a time.

HidDevice

Object for accessing HID device

HidDeviceInfoDeprecated

Storage for device related information

Enums

HidError

Type Definitions

HidResult