#[non_exhaustive]pub enum BrailleDisplay {
Show 43 variants
BrailleDisplay,
BrailleRow,
EightDotBrailleCell,
SixDotBrailleCell,
NumberofBrailleCells,
ScreenReaderControl,
ScreenReaderIdentifier,
RouterSet1,
RouterSet2,
RouterSet3,
RouterKey,
RowRouterKey,
BrailleButtons,
BrailleKeyboardDot1,
BrailleKeyboardDot2,
BrailleKeyboardDot3,
BrailleKeyboardDot4,
BrailleKeyboardDot5,
BrailleKeyboardDot6,
BrailleKeyboardDot7,
BrailleKeyboardDot8,
BrailleKeyboardSpace,
BrailleKeyboardLeftSpace,
BrailleKeyboardRightSpace,
BrailleFaceControls,
BrailleLeftControls,
BrailleRightControls,
BrailleTopControls,
BrailleJoystickCenter,
BrailleJoystickUp,
BrailleJoystickDown,
BrailleJoystickLeft,
BrailleJoystickRight,
BrailleDPadCenter,
BrailleDPadUp,
BrailleDPadDown,
BrailleDPadLeft,
BrailleDPadRight,
BraillePanLeft,
BraillePanRight,
BrailleRockerUp,
BrailleRockerDown,
BrailleRockerPress,
}Expand description
Usage Page 0x41: “Braille Display”
This enum is autogenerated from the HID Usage Tables.
let u1 = Usage::BrailleDisplay(BrailleDisplay::BrailleRow);
let u2 = Usage::new_from_page_and_id(0x41, 0x2).unwrap();
let u3 = Usage::from(BrailleDisplay::BrailleRow);
let u4: Usage = BrailleDisplay::BrailleRow.into();
assert_eq!(u1, u2);
assert_eq!(u1, u3);
assert_eq!(u1, u4);
assert!(matches!(u1.usage_page(), UsagePage::BrailleDisplay));
assert_eq!(0x41, u1.usage_page_value());
assert_eq!(0x2, u1.usage_id_value());
assert_eq!((0x41 << 16) | 0x2, u1.usage_value());
assert_eq!("Braille Row", u1.name());Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BrailleDisplay
Usage ID 0x1: “Braille Display”
BrailleRow
Usage ID 0x2: “Braille Row”
EightDotBrailleCell
Usage ID 0x3: “8 Dot Braille Cell”
SixDotBrailleCell
Usage ID 0x4: “6 Dot Braille Cell”
NumberofBrailleCells
Usage ID 0x5: “Number of Braille Cells”
ScreenReaderControl
Usage ID 0x6: “Screen Reader Control”
ScreenReaderIdentifier
Usage ID 0x7: “Screen Reader Identifier”
RouterSet1
Usage ID 0xFA: “Router Set 1”
RouterSet2
Usage ID 0xFB: “Router Set 2”
RouterSet3
Usage ID 0xFC: “Router Set 3”
RouterKey
Usage ID 0x100: “Router Key”
RowRouterKey
Usage ID 0x101: “Row Router Key”
BrailleButtons
Usage ID 0x200: “Braille Buttons”
BrailleKeyboardDot1
Usage ID 0x201: “Braille Keyboard Dot 1”
BrailleKeyboardDot2
Usage ID 0x202: “Braille Keyboard Dot 2”
BrailleKeyboardDot3
Usage ID 0x203: “Braille Keyboard Dot 3”
BrailleKeyboardDot4
Usage ID 0x204: “Braille Keyboard Dot 4”
BrailleKeyboardDot5
Usage ID 0x205: “Braille Keyboard Dot 5”
BrailleKeyboardDot6
Usage ID 0x206: “Braille Keyboard Dot 6”
BrailleKeyboardDot7
Usage ID 0x207: “Braille Keyboard Dot 7”
BrailleKeyboardDot8
Usage ID 0x208: “Braille Keyboard Dot 8”
BrailleKeyboardSpace
Usage ID 0x209: “Braille Keyboard Space”
BrailleKeyboardLeftSpace
Usage ID 0x20A: “Braille Keyboard Left Space”
BrailleKeyboardRightSpace
Usage ID 0x20B: “Braille Keyboard Right Space”
BrailleFaceControls
Usage ID 0x20C: “Braille Face Controls”
BrailleLeftControls
Usage ID 0x20D: “Braille Left Controls”
BrailleRightControls
Usage ID 0x20E: “Braille Right Controls”
BrailleTopControls
Usage ID 0x20F: “Braille Top Controls”
BrailleJoystickCenter
Usage ID 0x210: “Braille Joystick Center”
BrailleJoystickUp
Usage ID 0x211: “Braille Joystick Up”
BrailleJoystickDown
Usage ID 0x212: “Braille Joystick Down”
BrailleJoystickLeft
Usage ID 0x213: “Braille Joystick Left”
BrailleJoystickRight
Usage ID 0x214: “Braille Joystick Right”
BrailleDPadCenter
Usage ID 0x215: “Braille D-Pad Center”
BrailleDPadUp
Usage ID 0x216: “Braille D-Pad Up”
BrailleDPadDown
Usage ID 0x217: “Braille D-Pad Down”
BrailleDPadLeft
Usage ID 0x218: “Braille D-Pad Left”
BrailleDPadRight
Usage ID 0x219: “Braille D-Pad Right”
BraillePanLeft
Usage ID 0x21A: “Braille Pan Left”
BraillePanRight
Usage ID 0x21B: “Braille Pan Right”
BrailleRockerUp
Usage ID 0x21C: “Braille Rocker Up”
BrailleRockerDown
Usage ID 0x21D: “Braille Rocker Down”
BrailleRockerPress
Usage ID 0x21E: “Braille Rocker Press”
Implementations§
Trait Implementations§
Source§impl AsUsage for BrailleDisplay
impl AsUsage for BrailleDisplay
Source§fn usage_value(&self) -> u32
fn usage_value(&self) -> u32
Returns the 32 bit Usage value of this Usage
Source§fn usage_id_value(&self) -> u16
fn usage_id_value(&self) -> u16
Returns the 16 bit Usage ID value of this Usage
Source§fn usage(&self) -> Usage
fn usage(&self) -> Usage
Returns this usage as Usage::BrailleDisplay(self)
This is a convenience function to avoid having
to implement From for every used type in the caller.
let gd_x = GenericDesktop::X;
let usage = Usage::from(GenericDesktop::X);
assert!(matches!(gd_x.usage(), usage));Source§impl AsUsagePage for BrailleDisplay
impl AsUsagePage for BrailleDisplay
Source§fn usage_page_value(&self) -> u16
fn usage_page_value(&self) -> u16
Returns the 16 bit value of this UsagePage
This value is 0x41 for BrailleDisplay
Source§fn usage_page(&self) -> UsagePage
fn usage_page(&self) -> UsagePage
Returns UsagePage::BrailleDisplay]
Source§impl BitOr<u16> for BrailleDisplay
impl BitOr<u16> for BrailleDisplay
Source§impl Debug for BrailleDisplay
impl Debug for BrailleDisplay
Source§impl Display for BrailleDisplay
Available on crate feature std only.
impl Display for BrailleDisplay
std only.Source§impl From<&BrailleDisplay> for Usage
impl From<&BrailleDisplay> for Usage
Source§fn from(brailledisplay: &BrailleDisplay) -> Usage
fn from(brailledisplay: &BrailleDisplay) -> Usage
Source§impl From<&BrailleDisplay> for UsagePage
impl From<&BrailleDisplay> for UsagePage
Source§fn from(_: &BrailleDisplay) -> UsagePage
fn from(_: &BrailleDisplay) -> UsagePage
Always returns UsagePage::BrailleDisplay and is identical to BrailleDisplay::usage_page().
Source§impl From<&BrailleDisplay> for u16
impl From<&BrailleDisplay> for u16
Source§fn from(brailledisplay: &BrailleDisplay) -> u16
fn from(brailledisplay: &BrailleDisplay) -> u16
Source§impl From<&BrailleDisplay> for u32
impl From<&BrailleDisplay> for u32
Source§fn from(brailledisplay: &BrailleDisplay) -> u32
fn from(brailledisplay: &BrailleDisplay) -> u32
Returns the 32 bit value of this usage. This is identical to BrailleDisplay::usage_value().
Source§impl From<BrailleDisplay> for Usage
impl From<BrailleDisplay> for Usage
Source§fn from(brailledisplay: BrailleDisplay) -> Usage
fn from(brailledisplay: BrailleDisplay) -> Usage
Source§impl From<BrailleDisplay> for UsagePage
impl From<BrailleDisplay> for UsagePage
Source§fn from(_: BrailleDisplay) -> UsagePage
fn from(_: BrailleDisplay) -> UsagePage
Always returns UsagePage::BrailleDisplay and is identical to BrailleDisplay::usage_page().
Source§impl From<BrailleDisplay> for u16
impl From<BrailleDisplay> for u16
Source§fn from(brailledisplay: BrailleDisplay) -> u16
fn from(brailledisplay: BrailleDisplay) -> u16
Returns the 16bit value of this usage. This is identical to BrailleDisplay::usage_page_value().