Enum input_linux::EventRef 
source · pub enum EventRef<'a> {
    Synchronize(&'a SynchronizeEvent),
    Key(&'a KeyEvent),
    Relative(&'a RelativeEvent),
    Absolute(&'a AbsoluteEvent),
    Switch(&'a SwitchEvent),
    Misc(&'a MiscEvent),
    Led(&'a LedEvent),
    Autorepeat(&'a AutorepeatEvent),
    Sound(&'a SoundEvent),
    UInput(&'a UInputEvent),
    Unknown(&'a InputEvent),
}Expand description
A reference to an input event.
Variants§
Synchronize(&'a SynchronizeEvent)
Key(&'a KeyEvent)
Relative(&'a RelativeEvent)
Absolute(&'a AbsoluteEvent)
Switch(&'a SwitchEvent)
Misc(&'a MiscEvent)
Led(&'a LedEvent)
Autorepeat(&'a AutorepeatEvent)
Sound(&'a SoundEvent)
UInput(&'a UInputEvent)
Unknown(&'a InputEvent)
Unknown event type.
Implementations§
source§impl<'a> EventRef<'a>
 
impl<'a> EventRef<'a>
sourcepub fn new(event: &'a InputEvent) -> Result<Self, RangeError>
 
pub fn new(event: &'a InputEvent) -> Result<Self, RangeError>
Wraps the generic InputEvent into an event.
Trait Implementations§
source§impl<'a> AsRef<InputEvent> for EventRef<'a>
 
impl<'a> AsRef<InputEvent> for EventRef<'a>
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<'a> From<&'a AbsoluteEvent> for EventRef<'a>
 
impl<'a> From<&'a AbsoluteEvent> for EventRef<'a>
source§fn from(event: &'a AbsoluteEvent) -> Self
 
fn from(event: &'a AbsoluteEvent) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a AutorepeatEvent> for EventRef<'a>
 
impl<'a> From<&'a AutorepeatEvent> for EventRef<'a>
source§fn from(event: &'a AutorepeatEvent) -> Self
 
fn from(event: &'a AutorepeatEvent) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a RelativeEvent> for EventRef<'a>
 
impl<'a> From<&'a RelativeEvent> for EventRef<'a>
source§fn from(event: &'a RelativeEvent) -> Self
 
fn from(event: &'a RelativeEvent) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a SoundEvent> for EventRef<'a>
 
impl<'a> From<&'a SoundEvent> for EventRef<'a>
source§fn from(event: &'a SoundEvent) -> Self
 
fn from(event: &'a SoundEvent) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a SwitchEvent> for EventRef<'a>
 
impl<'a> From<&'a SwitchEvent> for EventRef<'a>
source§fn from(event: &'a SwitchEvent) -> Self
 
fn from(event: &'a SwitchEvent) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a SynchronizeEvent> for EventRef<'a>
 
impl<'a> From<&'a SynchronizeEvent> for EventRef<'a>
source§fn from(event: &'a SynchronizeEvent) -> Self
 
fn from(event: &'a SynchronizeEvent) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a UInputEvent> for EventRef<'a>
 
impl<'a> From<&'a UInputEvent> for EventRef<'a>
source§fn from(event: &'a UInputEvent) -> Self
 
fn from(event: &'a UInputEvent) -> Self
Converts to this type from the input type.
source§impl<'a> From<EventRef<'a>> for &'a InputEvent
 
impl<'a> From<EventRef<'a>> for &'a InputEvent
source§impl<'a> Ord for EventRef<'a>
 
impl<'a> Ord for EventRef<'a>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
    Self: Sized,
 
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<'a> PartialEq<EventRef<'a>> for EventRef<'a>
 
impl<'a> PartialEq<EventRef<'a>> for EventRef<'a>
source§impl<'a> PartialOrd<EventRef<'a>> for EventRef<'a>
 
impl<'a> PartialOrd<EventRef<'a>> for EventRef<'a>
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