Enum input_linux::EventKind
source · #[repr(u16)]
pub enum EventKind {
Show 33 variants
Synchronize,
Key,
Relative,
Absolute,
Misc,
Switch,
Unknown6,
Unknown7,
Unknown8,
Unknown9,
UnknownA,
UnknownB,
UnknownC,
UnknownD,
UnknownE,
UnknownF,
Unknown10,
Led,
Sound,
Unknown13,
Autorepeat,
ForceFeedback,
Power,
ForceFeedbackStatus,
Unknown18,
Unknown19,
Unknown1A,
Unknown1B,
Unknown1C,
Unknown1D,
Unknown1E,
Unknown1F,
UInput,
}Expand description
Event types
Variants§
Synchronize
Key
Relative
Absolute
Misc
Switch
Unknown6
Unknown7
Unknown8
Unknown9
UnknownA
UnknownB
UnknownC
UnknownD
UnknownE
UnknownF
Unknown10
Led
Sound
Unknown13
Autorepeat
ForceFeedback
Power
ForceFeedbackStatus
Unknown18
Unknown19
Unknown1A
Unknown1B
Unknown1C
Unknown1D
Unknown1E
Unknown1F
UInput
Implementations§
source§impl EventKind
impl EventKind
sourcepub fn from_type(code: u16) -> Result<Self, RangeError>
pub fn from_type(code: u16) -> Result<Self, RangeError>
Instantiate from a type code.
sourcepub fn count(&self) -> Result<usize, ()>
pub fn count(&self) -> Result<usize, ()>
Returns the maximum known number of codes for the current event
sourcepub fn count_bits(&self) -> Result<usize, ()>
pub fn count_bits(&self) -> Result<usize, ()>
Like count but with an exception for
Synchronize representing EventKind, matching
the behaviour of EVIOCGBIT and EVIOCGMASK. If you’re using a
bitmask you probably want this.
Trait Implementations§
source§impl BitmaskTrait for EventKind
impl BitmaskTrait for EventKind
source§fn array_default() -> Self::Array
fn array_default() -> Self::Array
The default empty state of the bitmask.
source§fn array_slice(array: &Self::Array) -> &[u8] ⓘ
fn array_slice(array: &Self::Array) -> &[u8] ⓘ
A representation of the bitmask as a slice of bytes.
source§impl<'de> Deserialize<'de> for EventKind
impl<'de> Deserialize<'de> for EventKind
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
source§impl IterableEnum for EventKind
impl IterableEnum for EventKind
source§impl Ord for EventKind
impl Ord for EventKind
source§impl PartialEq<EventKind> for EventKind
impl PartialEq<EventKind> for EventKind
source§impl PartialOrd<EventKind> for EventKind
impl PartialOrd<EventKind> for EventKind
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read more