It might make sense to use enums at
|
pub const VENDOR_QITECH: u16 = 0x0001; |
and following lines.
One can make enum constants equal to const values and automatically get an into() method.
#[repr(u16)]
enum MyEnum {
Qitech = 1,
Other = 2
}
const x: u16 = MyEnum::Qitech.into();