pub struct KeyboardUsage(/* private fields */);Expand description
USB HID keyboard usage supported by custom shortcuts.
Persisting a standard HID usage keeps the config independent of macOS virtual keys, Linux evdev codes, and Windows virtual-key codes. Unknown values are rejected during deserialization rather than silently ignored.
Implementations§
Trait Implementations§
Source§impl Clone for KeyboardUsage
impl Clone for KeyboardUsage
Source§fn clone(&self) -> KeyboardUsage
fn clone(&self) -> KeyboardUsage
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 KeyboardUsage
Source§impl Debug for KeyboardUsage
impl Debug for KeyboardUsage
Source§impl<'de> Deserialize<'de> for KeyboardUsage
impl<'de> Deserialize<'de> for KeyboardUsage
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 KeyboardUsage
Source§impl From<KeyboardUsage> for u8
impl From<KeyboardUsage> for u8
Source§fn from(value: KeyboardUsage) -> Self
fn from(value: KeyboardUsage) -> Self
Converts to this type from the input type.
Source§impl Hash for KeyboardUsage
impl Hash for KeyboardUsage
Source§impl PartialEq for KeyboardUsage
impl PartialEq for KeyboardUsage
Source§impl Serialize for KeyboardUsage
impl Serialize for KeyboardUsage
impl StructuralPartialEq for KeyboardUsage
Auto Trait Implementations§
impl Freeze for KeyboardUsage
impl RefUnwindSafe for KeyboardUsage
impl Send for KeyboardUsage
impl Sync for KeyboardUsage
impl Unpin for KeyboardUsage
impl UnsafeUnpin for KeyboardUsage
impl UnwindSafe for KeyboardUsage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.