pub trait GenericEvent: AsRef<InputEvent> + AsRef<input_event> {
    // Required methods
    fn event_kind(&self) -> EventKind;
    fn time(&self) -> &EventTime;
    fn code(&self) -> u16;
    fn value(&self) -> i32;
    fn from_ref(event: &InputEvent) -> Result<&Self, RangeError>;
    fn from_mut(event: &mut InputEvent) -> Result<&mut Self, RangeError>;
}
Expand description

A generic linux input event.

Required Methods§

source

fn event_kind(&self) -> EventKind

The event kind.

source

fn time(&self) -> &EventTime

The timestamp associated with the event.

source

fn code(&self) -> u16

The type code value of the event.

source

fn value(&self) -> i32

The value associated with the event.

source

fn from_ref(event: &InputEvent) -> Result<&Self, RangeError>

Interprets a generic event reference into a concrete event type.

source

fn from_mut(event: &mut InputEvent) -> Result<&mut Self, RangeError>

Interprets a mutable generic event reference into a concrete event type.

Implementors§