Enum input_linux::InputProperty

source ·
#[repr(u16)]
pub enum InputProperty {
Show 32 variants Pointer = 0, Direct = 1, ButtonPad = 2, SemiMultiTouch = 3, TopButtonPad = 4, PointingStick = 5, Accelerometer = 6, Unknown07 = 7, Unknown08 = 8, Unknown09 = 9, Unknown0A = 10, Unknown0B = 11, Unknown0C = 12, Unknown0D = 13, Unknown0E = 14, Unknown0F = 15, Unknown10 = 16, Unknown11 = 17, Unknown12 = 18, Unknown13 = 19, Unknown14 = 20, Unknown15 = 21, Unknown16 = 22, Unknown17 = 23, Unknown18 = 24, Unknown19 = 25, Unknown1A = 26, Unknown1B = 27, Unknown1C = 28, Unknown1D = 29, Unknown1E = 30, Unknown1F = 31,
}
Expand description

Device properties and quirks.

Variants§

§

Pointer = 0

§

Direct = 1

§

ButtonPad = 2

§

SemiMultiTouch = 3

§

TopButtonPad = 4

§

PointingStick = 5

§

Accelerometer = 6

§

Unknown07 = 7

§

Unknown08 = 8

§

Unknown09 = 9

§

Unknown0A = 10

§

Unknown0B = 11

§

Unknown0C = 12

§

Unknown0D = 13

§

Unknown0E = 14

§

Unknown0F = 15

§

Unknown10 = 16

§

Unknown11 = 17

§

Unknown12 = 18

§

Unknown13 = 19

§

Unknown14 = 20

§

Unknown15 = 21

§

Unknown16 = 22

§

Unknown17 = 23

§

Unknown18 = 24

§

Unknown19 = 25

§

Unknown1A = 26

§

Unknown1B = 27

§

Unknown1C = 28

§

Unknown1D = 29

§

Unknown1E = 30

§

Unknown1F = 31

Implementations§

source§

impl InputProperty

source

pub const COUNT: usize = 32usize

The maximum valid value.

source

pub fn iter() -> EnumIterator<Self>

An iterator over all values of the enum.

source

pub fn bitmask() -> Bitmask<Self>

A bitmask that can contain all values of the enum.

source

pub const fn code(&self) -> u16

Get the raw code value of the enum.

source§

impl InputProperty

source

pub fn from_code(code: u16) -> Result<Self, RangeError>

Instantiates the enum from a raw code value.

Trait Implementations§

source§

impl BitmaskTrait for InputProperty

§

type Array = [u8; 4]

The underlying array storage data type.
§

type Index = InputProperty

The type that the bitmask can be indexed by.
source§

const ZERO: Self::Array = _

Empty default data.
source§

fn array_default() -> Self::Array

The default empty state of the bitmask.
source§

fn array_slice(array: &Self::Array) -> &[u8]

A representation of the bitmask as a slice of bytes.
source§

fn array_slice_mut(array: &mut Self::Array) -> &mut [u8]

A mutable representation of the bitmask as a slice of bytes.
source§

fn index(index: Self::Index) -> usize

Computes a normalized index value.
source§

fn index_valid(_array: &Self::Array, _index: Self::Index) -> bool

Validates whether a given index is valid and in range for the bitmask. Read more
source§

impl Clone for InputProperty

source§

fn clone(&self) -> InputProperty

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for InputProperty

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for InputProperty

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<InputProperty> for u16

source§

fn from(v: InputProperty) -> Self

Converts to this type from the input type.
source§

impl Hash for InputProperty

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl IterableEnum for InputProperty

source§

fn iter_next(v: usize) -> Option<(usize, Self)>

Given an index into the iterator, return the value and the next index. Read more
source§

fn iter() -> EnumIterator<Self>

Instantiates an EnumIterator for an iterable type.
source§

impl Ord for InputProperty

source§

fn cmp(&self, other: &InputProperty) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for InputProperty

source§

fn eq(&self, other: &InputProperty) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for InputProperty

source§

fn partial_cmp(&self, other: &InputProperty) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Serialize for InputProperty

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<u16> for InputProperty

§

type Error = RangeError

The type returned in the event of a conversion error.
source§

fn try_from(code: u16) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Copy for InputProperty

source§

impl Eq for InputProperty

source§

impl StructuralPartialEq for InputProperty

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,