[][src]Enum input_linux::EventKind

#[repr(u16)]pub enum EventKind {
    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,
}

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

impl EventKind[src]

pub fn from_type(code: u16) -> Result<Self, RangeError>[src]

Instantiate from a type code.

pub fn count(&self) -> Result<usize, ()>[src]

Returns the maximum known number of codes for the current event

pub fn count_bits(&self) -> Result<usize, ()>[src]

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.

impl EventKind[src]

pub const COUNT: usize[src]

The maximum valid value.

pub fn iter() -> EnumIterator<Self>

Notable traits for EnumIterator<T>

impl<T: IterableEnum> Iterator for EnumIterator<T> type Item = T;
[src]

An iterator over all values of the enum.

pub fn bitmask() -> Bitmask<Self>[src]

A bitmask that can contain all values of the enum.

Trait Implementations

impl BitmaskTrait for EventKind[src]

type Array = [u8; 4]

The underlying array storage data type.

type Index = EventKind

The type that the bitmask can be indexed by.

impl Clone for EventKind[src]

impl Copy for EventKind[src]

impl Debug for EventKind[src]

impl Eq for EventKind[src]

impl From<EventKind> for u16[src]

impl Hash for EventKind[src]

impl IterableEnum for EventKind[src]

impl Ord for EventKind[src]

impl PartialEq<EventKind> for EventKind[src]

impl PartialOrd<EventKind> for EventKind[src]

impl StructuralEq for EventKind[src]

impl StructuralPartialEq for EventKind[src]

impl TryFrom<u16> for EventKind[src]

type Error = RangeError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.