#[non_exhaustive]#[repr(u8)]pub enum SystemControlKey {
No = 0,
PowerDown = 129,
Sleep = 130,
WakeUp = 131,
Restart = 143,
}Expand description
Keys in Generic Desktop Page, generally used for system control
Ref: https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf#page=26
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.
Implementations§
Source§impl SystemControlKey
impl SystemControlKey
Sourcepub fn to_hid_keycode(&self) -> Option<HidKeyCode>
pub fn to_hid_keycode(&self) -> Option<HidKeyCode>
Convert SystemControlKey to the corresponding HidKeyCode
Trait Implementations§
Source§impl Clone for SystemControlKey
impl Clone for SystemControlKey
Source§fn clone(&self) -> SystemControlKey
fn clone(&self) -> SystemControlKey
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 SystemControlKey
Source§impl Debug for SystemControlKey
impl Debug for SystemControlKey
Source§impl<'de> Deserialize<'de> for SystemControlKey
impl<'de> Deserialize<'de> for SystemControlKey
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 SystemControlKey
Source§impl MaxSize for SystemControlKey
impl MaxSize for SystemControlKey
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 SystemControlKey
impl Ord for SystemControlKey
Source§fn cmp(&self, other: &SystemControlKey) -> Ordering
fn cmp(&self, other: &SystemControlKey) -> 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 SystemControlKey
impl PartialEq for SystemControlKey
Source§impl PartialOrd for SystemControlKey
impl PartialOrd for SystemControlKey
Source§impl Serialize for SystemControlKey
impl Serialize for SystemControlKey
impl StructuralPartialEq for SystemControlKey
Auto Trait Implementations§
impl Freeze for SystemControlKey
impl RefUnwindSafe for SystemControlKey
impl Send for SystemControlKey
impl Sync for SystemControlKey
impl Unpin for SystemControlKey
impl UnsafeUnpin for SystemControlKey
impl UnwindSafe for SystemControlKey
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