#[non_exhaustive]#[repr(u8)]pub enum DeviceKind {
Unknown = 0,
Keyboard = 1,
Mouse = 2,
Numpad = 3,
Presenter = 4,
Remote = 7,
Trackball = 8,
Touchpad = 9,
Tablet = 10,
Gamepad = 11,
Joystick = 12,
Headset = 13,
}Expand description
Represents the kind of a device paired to a Bolt receiver.
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.
Unknown = 0
Keyboard = 1
Mouse = 2
Numpad = 3
Presenter = 4
Remote = 7
Trackball = 8
Touchpad = 9
Tablet = 10
Gamepad = 11
Joystick = 12
Headset = 13
Trait Implementations§
Source§impl Clone for DeviceKind
impl Clone for DeviceKind
Source§fn clone(&self) -> DeviceKind
fn clone(&self) -> DeviceKind
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 DeviceKind
Source§impl Debug for DeviceKind
impl Debug for DeviceKind
impl Eq for DeviceKind
Source§impl From<DeviceKind> for u8
impl From<DeviceKind> for u8
Source§fn from(enum_value: DeviceKind) -> Self
fn from(enum_value: DeviceKind) -> Self
Converts to this type from the input type.
Source§impl Hash for DeviceKind
impl Hash for DeviceKind
Source§impl PartialEq for DeviceKind
impl PartialEq for DeviceKind
Source§fn eq(&self, other: &DeviceKind) -> bool
fn eq(&self, other: &DeviceKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DeviceKind
Source§impl TryFrom<u8> for DeviceKind
impl TryFrom<u8> for DeviceKind
Source§type Error = TryFromPrimitiveError<DeviceKind>
type Error = TryFromPrimitiveError<DeviceKind>
The type returned in the event of a conversion error.
Source§impl TryFromPrimitive for DeviceKind
impl TryFromPrimitive for DeviceKind
const NAME: &'static str = "DeviceKind"
type Primitive = u8
type Error = TryFromPrimitiveError<DeviceKind>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
Auto Trait Implementations§
impl Freeze for DeviceKind
impl RefUnwindSafe for DeviceKind
impl Send for DeviceKind
impl Sync for DeviceKind
impl Unpin for DeviceKind
impl UnsafeUnpin for DeviceKind
impl UnwindSafe for DeviceKind
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