hid-types 0.2.1

Rust types for working with USB HID report descriptors
Documentation
//! Collection types.

use num_enum::{IntoPrimitive, TryFromPrimitive};

use crate::Ident;

/// A known __Collection__ type.
#[expect(missing_docs)]
#[derive(Clone, Copy, Debug, PartialEq, TryFromPrimitive, IntoPrimitive)]
#[repr(u8)]
pub enum KnownCollectionType {
    Physical = 0,
    Application = 1,
    Logical = 2,
    Report = 3,
    NamedArray = 4,
    UsageSwitch = 5,
    UsageModifier = 6,
}

/// A __Collection__ type.
pub type CollectionType = Ident<KnownCollectionType, u8>;