usbhidusage 0.1.3

A general purpose library for working with usb Human Interface Device Descriptors from the HID Usage Tables for Universal Serial Bus (USB) v1.5
Documentation
#[derive(Clone, Copy, PartialEq, PartialOrd, Ord, Eq, Hash, Debug, Default)]
#[non_exhaustive]
pub struct UnicodeUsage {
    char: char,
}
impl UnicodeUsage {
    const REPLACEMENT_CHARACTER: UnicodeUsage = Self::new(char::REPLACEMENT_CHARACTER);
    const fn new(char: char) -> Self {
        Self { char: char }
    }
}
impl<T> From<T> for UnicodeUsage
where
    T: TryInto<u16>,
{
    fn from(value: T) -> Self {
        let value: u16 = value.try_into().unwrap_or(0);
        Self::new(char::from_u32(value as u32).unwrap_or(''))
    }
}