Enum DeviceType
#[repr(i32)]pub enum DeviceType {
Unset = 0,
Mouse = 1,
Keyboard = 2,
}Expand description
Device type.
Variants§
Trait Implementations§
§impl Clone for DeviceType
impl Clone for DeviceType
§fn clone(&self) -> DeviceType
fn clone(&self) -> DeviceType
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 more§impl Debug for DeviceType
impl Debug for DeviceType
§impl Default for DeviceType
impl Default for DeviceType
§fn default() -> DeviceType
fn default() -> DeviceType
Returns the “default value” for a type. Read more
§impl Hash for DeviceType
impl Hash for DeviceType
§impl Ord for DeviceType
impl Ord for DeviceType
§fn cmp(&self, other: &DeviceType) -> Ordering
fn cmp(&self, other: &DeviceType) -> 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
§impl PartialEq for DeviceType
impl PartialEq for DeviceType
§impl PartialOrd for DeviceType
impl PartialOrd for DeviceType
§impl TryFrom<i32> for DeviceType
impl TryFrom<i32> for DeviceType
§type Error = TryFromPrimitiveError<DeviceType>
type Error = TryFromPrimitiveError<DeviceType>
The type returned in the event of a conversion error.
§fn try_from(
number: i32,
) -> Result<DeviceType, TryFromPrimitiveError<DeviceType>>
fn try_from( number: i32, ) -> Result<DeviceType, TryFromPrimitiveError<DeviceType>>
Performs the conversion.
§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>>
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