Enum input_linux::EventKind
source · #[repr(u16)]pub enum EventKind {
Show 33 variants
Synchronize = 0,
Key = 1,
Relative = 2,
Absolute = 3,
Misc = 4,
Switch = 5,
Unknown6 = 6,
Unknown7 = 7,
Unknown8 = 8,
Unknown9 = 9,
UnknownA = 10,
UnknownB = 11,
UnknownC = 12,
UnknownD = 13,
UnknownE = 14,
UnknownF = 15,
Unknown10 = 16,
Led = 17,
Sound = 18,
Unknown13 = 19,
Autorepeat = 20,
ForceFeedback = 21,
Power = 22,
ForceFeedbackStatus = 23,
Unknown18 = 24,
Unknown19 = 25,
Unknown1A = 26,
Unknown1B = 27,
Unknown1C = 28,
Unknown1D = 29,
Unknown1E = 30,
Unknown1F = 31,
UInput = 257,
}Expand description
Event types
Variants§
Synchronize = 0
Key = 1
Relative = 2
Absolute = 3
Misc = 4
Switch = 5
Unknown6 = 6
Unknown7 = 7
Unknown8 = 8
Unknown9 = 9
UnknownA = 10
UnknownB = 11
UnknownC = 12
UnknownD = 13
UnknownE = 14
UnknownF = 15
Unknown10 = 16
Led = 17
Sound = 18
Unknown13 = 19
Autorepeat = 20
ForceFeedback = 21
Power = 22
ForceFeedbackStatus = 23
Unknown18 = 24
Unknown19 = 25
Unknown1A = 26
Unknown1B = 27
Unknown1C = 28
Unknown1D = 29
Unknown1E = 30
Unknown1F = 31
UInput = 257
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 for EventKind
impl PartialEq for EventKind
source§impl PartialOrd for EventKind
impl PartialOrd 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 moreimpl Copy for EventKind
impl Eq for EventKind
impl StructuralPartialEq for EventKind
Auto Trait Implementations§
impl Freeze for EventKind
impl RefUnwindSafe for EventKind
impl Send for EventKind
impl Sync for EventKind
impl Unpin for EventKind
impl UnwindSafe for EventKind
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)