[][src]Struct input_linux::InputEvent

#[repr(C)]pub struct InputEvent {
    pub time: EventTime,
    pub kind: EventKind,
    pub code: u16,
    pub value: i32,
}

A generic event.

Fields

time: EventTime

The timestamp associated with the event.

kind: EventKind

The type of event that occurred.

code: u16

The code of the event.

The meaning of this code depends on the kind of event. Using the typed events via Event and EventRef is recommended.

value: i32

The value of the event.

The interpretation of this value depends on the kind of event.

Implementations

impl InputEvent[src]

pub fn as_bytes(&self) -> &[u8; 24][src]

Reinterpret this event as an array of bytes

impl InputEvent[src]

pub fn from_raw(event: &input_event) -> Result<&Self, RangeError>[src]

Reinterprets a raw input_event.

pub fn from_raw_mut(event: &mut input_event) -> Result<&mut Self, RangeError>[src]

Reinterprets a raw input_event into a mutable reference.

pub fn as_raw(&self) -> &input_event[src]

Reinterprets the event as a raw input_event.

pub unsafe fn as_raw_mut(&mut self) -> &mut input_event[src]

Reinterprets the event as a mutable raw input_event.

Trait Implementations

impl AsRef<InputEvent> for SynchronizeEvent[src]

impl AsRef<InputEvent> for KeyEvent[src]

impl AsRef<InputEvent> for InputEvent[src]

impl AsRef<InputEvent> for Event[src]

impl<'a> AsRef<InputEvent> for EventRef<'a>[src]

impl<'a> AsRef<InputEvent> for EventMut<'a>[src]

impl AsRef<InputEvent> for RelativeEvent[src]

impl AsRef<InputEvent> for AbsoluteEvent[src]

impl AsRef<InputEvent> for SwitchEvent[src]

impl AsRef<InputEvent> for MiscEvent[src]

impl AsRef<InputEvent> for LedEvent[src]

impl AsRef<InputEvent> for AutorepeatEvent[src]

impl AsRef<InputEvent> for SoundEvent[src]

impl AsRef<InputEvent> for UInputEvent[src]

impl AsRef<input_event> for InputEvent[src]

impl Clone for InputEvent[src]

impl Copy for InputEvent[src]

impl Debug for InputEvent[src]

impl Eq for InputEvent[src]

impl<'a> From<&'a AbsoluteEvent> for &'a InputEvent[src]

impl<'a> From<&'a AbsoluteEvent> for InputEvent[src]

impl<'a> From<&'a AutorepeatEvent> for &'a InputEvent[src]

impl<'a> From<&'a AutorepeatEvent> for InputEvent[src]

impl<'a> From<&'a EventMut<'a>> for &'a InputEvent[src]

impl<'a> From<&'a KeyEvent> for &'a InputEvent[src]

impl<'a> From<&'a KeyEvent> for InputEvent[src]

impl<'a> From<&'a LedEvent> for &'a InputEvent[src]

impl<'a> From<&'a LedEvent> for InputEvent[src]

impl<'a> From<&'a MiscEvent> for &'a InputEvent[src]

impl<'a> From<&'a MiscEvent> for InputEvent[src]

impl<'a> From<&'a RelativeEvent> for &'a InputEvent[src]

impl<'a> From<&'a RelativeEvent> for InputEvent[src]

impl<'a> From<&'a SoundEvent> for &'a InputEvent[src]

impl<'a> From<&'a SoundEvent> for InputEvent[src]

impl<'a> From<&'a SwitchEvent> for &'a InputEvent[src]

impl<'a> From<&'a SwitchEvent> for InputEvent[src]

impl<'a> From<&'a SynchronizeEvent> for &'a InputEvent[src]

impl<'a> From<&'a SynchronizeEvent> for InputEvent[src]

impl<'a> From<&'a UInputEvent> for &'a InputEvent[src]

impl<'a> From<&'a UInputEvent> for InputEvent[src]

impl From<AbsoluteEvent> for InputEvent[src]

impl From<AutorepeatEvent> for InputEvent[src]

impl From<Event> for InputEvent[src]

impl<'a> From<EventRef<'a>> for &'a InputEvent[src]

impl From<KeyEvent> for InputEvent[src]

impl From<LedEvent> for InputEvent[src]

impl From<MiscEvent> for InputEvent[src]

impl From<RelativeEvent> for InputEvent[src]

impl From<SoundEvent> for InputEvent[src]

impl From<SwitchEvent> for InputEvent[src]

impl From<SynchronizeEvent> for InputEvent[src]

impl From<UInputEvent> for InputEvent[src]

impl GenericEvent for InputEvent[src]

impl Hash for InputEvent[src]

impl Ord for InputEvent[src]

impl PartialEq<InputEvent> for InputEvent[src]

impl PartialOrd<InputEvent> for InputEvent[src]

impl StructuralEq for InputEvent[src]

impl StructuralPartialEq for InputEvent[src]

impl<'a> TryFrom<&'a InputEvent> for &'a SynchronizeEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a InputEvent> for &'a KeyEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a InputEvent> for &'a RelativeEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a InputEvent> for &'a AbsoluteEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a InputEvent> for &'a SwitchEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a InputEvent> for &'a MiscEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a InputEvent> for &'a LedEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a InputEvent> for &'a AutorepeatEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a InputEvent> for &'a SoundEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a InputEvent> for &'a UInputEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut SynchronizeEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut KeyEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut RelativeEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut AbsoluteEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut SwitchEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut MiscEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut LedEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut AutorepeatEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut SoundEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut UInputEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl TryFrom<InputEvent> for SynchronizeEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl TryFrom<InputEvent> for KeyEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl TryFrom<InputEvent> for RelativeEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl TryFrom<InputEvent> for AbsoluteEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl TryFrom<InputEvent> for SwitchEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl TryFrom<InputEvent> for MiscEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl TryFrom<InputEvent> for LedEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl TryFrom<InputEvent> for AutorepeatEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl TryFrom<InputEvent> for SoundEvent[src]

type Error = RangeError

The type returned in the event of a conversion error.

impl TryFrom<InputEvent> for UInputEvent[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.