#[repr(i32)]pub enum DeviceType {
Unset = 0,
Mouse = 1,
Keyboard = 2,
}Expand description
Device type.
Variants§
Trait Implementations§
Source§impl Clone for DeviceType
impl Clone for DeviceType
Source§fn clone(&self) -> DeviceType
fn clone(&self) -> DeviceType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceType
impl Debug for DeviceType
Source§impl Default for DeviceType
impl Default for DeviceType
Source§fn default() -> DeviceType
fn default() -> DeviceType
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DeviceType
impl<'de> Deserialize<'de> for DeviceType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DeviceType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DeviceType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for DeviceType
impl Display for DeviceType
Source§impl<'_derivative_strum> From<&'_derivative_strum DeviceType> for &'static str
impl<'_derivative_strum> From<&'_derivative_strum DeviceType> for &'static str
Source§fn from(x: &'_derivative_strum DeviceType) -> &'static str
fn from(x: &'_derivative_strum DeviceType) -> &'static str
Converts to this type from the input type.
Source§impl From<DeviceType> for &'static str
impl From<DeviceType> for &'static str
Source§fn from(x: DeviceType) -> &'static str
fn from(x: DeviceType) -> &'static str
Converts to this type from the input type.
Source§impl Hash for DeviceType
impl Hash for DeviceType
Source§impl IntoEnumIterator for DeviceType
impl IntoEnumIterator for DeviceType
type Iterator = DeviceTypeIter
fn iter() -> DeviceTypeIter ⓘ
Source§impl Ord for DeviceType
impl Ord for DeviceType
Source§fn cmp(&self, other: &DeviceType) -> Ordering
fn cmp(&self, other: &DeviceType) -> Ordering
1.21.0 · 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 DeviceType
impl PartialEq for DeviceType
Source§impl PartialOrd for DeviceType
impl PartialOrd for DeviceType
Source§impl Serialize for DeviceType
impl Serialize for DeviceType
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TryFrom<i32> for DeviceType
impl TryFrom<i32> for DeviceType
Source§type Error = TryFromPrimitiveError<DeviceType>
type Error = TryFromPrimitiveError<DeviceType>
The type returned in the event of a conversion error.
Source§fn try_from(
number: i32,
) -> Result<DeviceType, TryFromPrimitiveError<DeviceType>>
fn try_from( number: i32, ) -> Result<DeviceType, TryFromPrimitiveError<DeviceType>>
Performs the conversion.
Source§impl TryFromPrimitive for DeviceType
impl TryFromPrimitive for DeviceType
const NAME: &'static str = "DeviceType"
type Primitive = i32
type Error = TryFromPrimitiveError<DeviceType>
fn try_from_primitive( number: <DeviceType as TryFromPrimitive>::Primitive, ) -> Result<DeviceType, TryFromPrimitiveError<DeviceType>>
Source§impl VariantNames for DeviceType
impl VariantNames for DeviceType
impl Copy for DeviceType
impl Eq for DeviceType
impl StructuralPartialEq for DeviceType
Auto Trait Implementations§
impl Freeze for DeviceType
impl RefUnwindSafe for DeviceType
impl Send for DeviceType
impl Sync for DeviceType
impl Unpin for DeviceType
impl UnsafeUnpin for DeviceType
impl UnwindSafe for DeviceType
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