#[non_exhaustive]pub enum ConsumerKey {
Show 52 variants
No,
SnapShot,
BrightnessUp,
BrightnessDown,
Play,
Pause,
Record,
FastForward,
Rewind,
NextTrack,
PrevTrack,
StopPlay,
Eject,
RandomPlay,
Repeat,
StopEject,
PlayPause,
Mute,
VolumeIncrement,
VolumeDecrement,
Reserved,
Email,
Calculator,
LocalBrowser,
Lock,
ControlPanel,
Assistant,
New,
Open,
Close,
Exit,
Maximize,
Minimize,
Save,
Print,
Properties,
Undo,
Copy,
Cut,
Paste,
SelectAll,
Find,
Search,
Home,
Back,
Forward,
Stop,
Refresh,
Bookmarks,
NextKeyboardLayoutSelect,
DesktopShowAllWindows,
AcSoftKeyLeft,
}Expand description
Keys in consumer page Ref: https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf#page=75
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
No
SnapShot
BrightnessUp
BrightnessDown
Play
Pause
Record
FastForward
Rewind
NextTrack
PrevTrack
StopPlay
Eject
RandomPlay
Repeat
StopEject
PlayPause
Mute
VolumeIncrement
VolumeDecrement
Reserved
Calculator
LocalBrowser
Lock
ControlPanel
Assistant
New
Open
Close
Exit
Maximize
Minimize
Save
Properties
Undo
Copy
Cut
Paste
SelectAll
Find
Search
Home
Back
Forward
Stop
Refresh
Bookmarks
NextKeyboardLayoutSelect
DesktopShowAllWindows
AcSoftKeyLeft
Implementations§
Source§impl ConsumerKey
impl ConsumerKey
Sourcepub fn to_hid_keycode(&self) -> Option<HidKeyCode>
pub fn to_hid_keycode(&self) -> Option<HidKeyCode>
Convert ConsumerKey to the corresponding HidKeyCode
Trait Implementations§
Source§impl Clone for ConsumerKey
impl Clone for ConsumerKey
Source§fn clone(&self) -> ConsumerKey
fn clone(&self) -> ConsumerKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ConsumerKey
Source§impl Debug for ConsumerKey
impl Debug for ConsumerKey
Source§impl<'de> Deserialize<'de> for ConsumerKey
impl<'de> Deserialize<'de> for ConsumerKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ConsumerKey
Source§impl From<ConsumerKey> for u16
impl From<ConsumerKey> for u16
Source§fn from(value: ConsumerKey) -> Self
fn from(value: ConsumerKey) -> Self
Converts to this type from the input type.
Source§impl From<u16> for ConsumerKey
impl From<u16> for ConsumerKey
Source§impl MaxSize for ConsumerKey
impl MaxSize for ConsumerKey
Source§const POSTCARD_MAX_SIZE: usize
const POSTCARD_MAX_SIZE: usize
The maximum possible size that the serialization of this
type can have, in bytes.
Source§impl Ord for ConsumerKey
impl Ord for ConsumerKey
Source§fn cmp(&self, other: &ConsumerKey) -> Ordering
fn cmp(&self, other: &ConsumerKey) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ConsumerKey
impl PartialEq for ConsumerKey
Source§impl PartialOrd for ConsumerKey
impl PartialOrd for ConsumerKey
Source§impl Serialize for ConsumerKey
impl Serialize for ConsumerKey
impl StructuralPartialEq for ConsumerKey
Auto Trait Implementations§
impl Freeze for ConsumerKey
impl RefUnwindSafe for ConsumerKey
impl Send for ConsumerKey
impl Sync for ConsumerKey
impl Unpin for ConsumerKey
impl UnsafeUnpin for ConsumerKey
impl UnwindSafe for ConsumerKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more