Enum input_linux::Event
source · pub enum Event {
Synchronize(SynchronizeEvent),
Key(KeyEvent),
Relative(RelativeEvent),
Absolute(AbsoluteEvent),
Switch(SwitchEvent),
Misc(MiscEvent),
Led(LedEvent),
Autorepeat(AutorepeatEvent),
Sound(SoundEvent),
UInput(UInputEvent),
Unknown(InputEvent),
}Expand description
An owned and typed input event.
Variants§
Synchronize(SynchronizeEvent)
Key(KeyEvent)
Relative(RelativeEvent)
Absolute(AbsoluteEvent)
Switch(SwitchEvent)
Misc(MiscEvent)
Led(LedEvent)
Autorepeat(AutorepeatEvent)
Sound(SoundEvent)
UInput(UInputEvent)
Unknown(InputEvent)
Unknown event type.
Implementations§
source§impl Event
impl Event
sourcepub fn new(event: InputEvent) -> Result<Self, RangeError>
pub fn new(event: InputEvent) -> Result<Self, RangeError>
Converts a generic InputEvent to a typed event.
Trait Implementations§
source§impl AsRef<InputEvent> for Event
impl AsRef<InputEvent> for Event
source§fn as_ref(&self) -> &InputEvent
fn as_ref(&self) -> &InputEvent
Converts this type into a shared reference of the (usually inferred) input type.
source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
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 From<AbsoluteEvent> for Event
impl From<AbsoluteEvent> for Event
source§fn from(event: AbsoluteEvent) -> Self
fn from(event: AbsoluteEvent) -> Self
Converts to this type from the input type.
source§impl From<AutorepeatEvent> for Event
impl From<AutorepeatEvent> for Event
source§fn from(event: AutorepeatEvent) -> Self
fn from(event: AutorepeatEvent) -> Self
Converts to this type from the input type.
source§impl From<Event> for InputEvent
impl From<Event> for InputEvent
source§impl From<RelativeEvent> for Event
impl From<RelativeEvent> for Event
source§fn from(event: RelativeEvent) -> Self
fn from(event: RelativeEvent) -> Self
Converts to this type from the input type.
source§impl From<SoundEvent> for Event
impl From<SoundEvent> for Event
source§fn from(event: SoundEvent) -> Self
fn from(event: SoundEvent) -> Self
Converts to this type from the input type.
source§impl From<SwitchEvent> for Event
impl From<SwitchEvent> for Event
source§fn from(event: SwitchEvent) -> Self
fn from(event: SwitchEvent) -> Self
Converts to this type from the input type.
source§impl From<SynchronizeEvent> for Event
impl From<SynchronizeEvent> for Event
source§fn from(event: SynchronizeEvent) -> Self
fn from(event: SynchronizeEvent) -> Self
Converts to this type from the input type.
source§impl From<UInputEvent> for Event
impl From<UInputEvent> for Event
source§fn from(event: UInputEvent) -> Self
fn from(event: UInputEvent) -> Self
Converts to this type from the input type.
source§impl Ord for Event
impl Ord for Event
source§impl PartialEq<Event> for Event
impl PartialEq<Event> for Event
source§impl PartialOrd<Event> for Event
impl PartialOrd<Event> for Event
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