[−][src]Struct input_linux::InputEvent
A generic event.
Fields
time: EventTimeThe timestamp associated with the event.
kind: EventKindThe type of event that occurred.
code: u16The 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: i32The value of the event.
The interpretation of this value depends on the kind of event.
Implementations
impl InputEvent[src]
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]
pub fn as_ref(&self) -> &InputEvent[src]
impl AsRef<InputEvent> for KeyEvent[src]
pub fn as_ref(&self) -> &InputEvent[src]
impl AsRef<InputEvent> for InputEvent[src]
pub fn as_ref(&self) -> &InputEvent[src]
impl AsRef<InputEvent> for Event[src]
pub fn as_ref(&self) -> &InputEvent[src]
impl<'a> AsRef<InputEvent> for EventRef<'a>[src]
pub fn as_ref(&self) -> &InputEvent[src]
impl<'a> AsRef<InputEvent> for EventMut<'a>[src]
pub fn as_ref(&self) -> &InputEvent[src]
impl AsRef<InputEvent> for RelativeEvent[src]
pub fn as_ref(&self) -> &InputEvent[src]
impl AsRef<InputEvent> for AbsoluteEvent[src]
pub fn as_ref(&self) -> &InputEvent[src]
impl AsRef<InputEvent> for SwitchEvent[src]
pub fn as_ref(&self) -> &InputEvent[src]
impl AsRef<InputEvent> for MiscEvent[src]
pub fn as_ref(&self) -> &InputEvent[src]
impl AsRef<InputEvent> for LedEvent[src]
pub fn as_ref(&self) -> &InputEvent[src]
impl AsRef<InputEvent> for AutorepeatEvent[src]
pub fn as_ref(&self) -> &InputEvent[src]
impl AsRef<InputEvent> for SoundEvent[src]
pub fn as_ref(&self) -> &InputEvent[src]
impl AsRef<InputEvent> for UInputEvent[src]
pub fn as_ref(&self) -> &InputEvent[src]
impl AsRef<input_event> for InputEvent[src]
impl Clone for InputEvent[src]
pub fn clone(&self) -> InputEvent[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[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]
pub fn from(event: &'a AbsoluteEvent) -> Self[src]
impl<'a> From<&'a AbsoluteEvent> for InputEvent[src]
pub fn from(event: &'a AbsoluteEvent) -> Self[src]
impl<'a> From<&'a AutorepeatEvent> for &'a InputEvent[src]
pub fn from(event: &'a AutorepeatEvent) -> Self[src]
impl<'a> From<&'a AutorepeatEvent> for InputEvent[src]
pub fn from(event: &'a AutorepeatEvent) -> Self[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]
pub fn from(event: &'a RelativeEvent) -> Self[src]
impl<'a> From<&'a RelativeEvent> for InputEvent[src]
pub fn from(event: &'a RelativeEvent) -> Self[src]
impl<'a> From<&'a SoundEvent> for &'a InputEvent[src]
pub fn from(event: &'a SoundEvent) -> Self[src]
impl<'a> From<&'a SoundEvent> for InputEvent[src]
pub fn from(event: &'a SoundEvent) -> Self[src]
impl<'a> From<&'a SwitchEvent> for &'a InputEvent[src]
pub fn from(event: &'a SwitchEvent) -> Self[src]
impl<'a> From<&'a SwitchEvent> for InputEvent[src]
pub fn from(event: &'a SwitchEvent) -> Self[src]
impl<'a> From<&'a SynchronizeEvent> for &'a InputEvent[src]
pub fn from(event: &'a SynchronizeEvent) -> Self[src]
impl<'a> From<&'a SynchronizeEvent> for InputEvent[src]
pub fn from(event: &'a SynchronizeEvent) -> Self[src]
impl<'a> From<&'a UInputEvent> for &'a InputEvent[src]
pub fn from(event: &'a UInputEvent) -> Self[src]
impl<'a> From<&'a UInputEvent> for InputEvent[src]
pub fn from(event: &'a UInputEvent) -> Self[src]
impl From<AbsoluteEvent> for InputEvent[src]
pub fn from(event: AbsoluteEvent) -> Self[src]
impl From<AutorepeatEvent> for InputEvent[src]
pub fn from(event: AutorepeatEvent) -> Self[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]
pub fn from(event: RelativeEvent) -> Self[src]
impl From<SoundEvent> for InputEvent[src]
pub fn from(event: SoundEvent) -> Self[src]
impl From<SwitchEvent> for InputEvent[src]
pub fn from(event: SwitchEvent) -> Self[src]
impl From<SynchronizeEvent> for InputEvent[src]
pub fn from(event: SynchronizeEvent) -> Self[src]
impl From<UInputEvent> for InputEvent[src]
pub fn from(event: UInputEvent) -> Self[src]
impl GenericEvent for InputEvent[src]
pub fn event_kind(&self) -> EventKind[src]
pub fn time(&self) -> &EventTime[src]
pub fn code(&self) -> u16[src]
pub fn value(&self) -> i32[src]
pub fn from_ref(event: &InputEvent) -> Result<&Self, RangeError>[src]
pub fn from_mut(event: &mut InputEvent) -> Result<&mut Self, RangeError>[src]
impl Hash for InputEvent[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl Ord for InputEvent[src]
pub fn cmp(&self, other: &InputEvent) -> Ordering[src]
#[must_use]pub fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self1.50.0[src]
impl PartialEq<InputEvent> for InputEvent[src]
pub fn eq(&self, other: &InputEvent) -> bool[src]
pub fn ne(&self, other: &InputEvent) -> bool[src]
impl PartialOrd<InputEvent> for InputEvent[src]
pub fn partial_cmp(&self, other: &InputEvent) -> Option<Ordering>[src]
pub fn lt(&self, other: &InputEvent) -> bool[src]
pub fn le(&self, other: &InputEvent) -> bool[src]
pub fn gt(&self, other: &InputEvent) -> bool[src]
pub fn ge(&self, other: &InputEvent) -> bool[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.
pub fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a InputEvent> for &'a KeyEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a InputEvent> for &'a RelativeEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a InputEvent> for &'a AbsoluteEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a InputEvent> for &'a SwitchEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a InputEvent> for &'a MiscEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a InputEvent> for &'a LedEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a InputEvent> for &'a AutorepeatEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a InputEvent> for &'a SoundEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a InputEvent> for &'a UInputEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a mut InputEvent> for &'a mut SynchronizeEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a mut InputEvent> for &'a mut KeyEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a mut InputEvent> for &'a mut RelativeEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a mut InputEvent> for &'a mut AbsoluteEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a mut InputEvent> for &'a mut SwitchEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a mut InputEvent> for &'a mut MiscEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a mut InputEvent> for &'a mut LedEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a mut InputEvent> for &'a mut AutorepeatEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a mut InputEvent> for &'a mut SoundEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>[src]
impl<'a> TryFrom<&'a mut InputEvent> for &'a mut UInputEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>[src]
impl TryFrom<InputEvent> for SynchronizeEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: InputEvent) -> Result<Self, Self::Error>[src]
impl TryFrom<InputEvent> for KeyEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: InputEvent) -> Result<Self, Self::Error>[src]
impl TryFrom<InputEvent> for RelativeEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: InputEvent) -> Result<Self, Self::Error>[src]
impl TryFrom<InputEvent> for AbsoluteEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: InputEvent) -> Result<Self, Self::Error>[src]
impl TryFrom<InputEvent> for SwitchEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: InputEvent) -> Result<Self, Self::Error>[src]
impl TryFrom<InputEvent> for MiscEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: InputEvent) -> Result<Self, Self::Error>[src]
impl TryFrom<InputEvent> for LedEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: InputEvent) -> Result<Self, Self::Error>[src]
impl TryFrom<InputEvent> for AutorepeatEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: InputEvent) -> Result<Self, Self::Error>[src]
impl TryFrom<InputEvent> for SoundEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: InputEvent) -> Result<Self, Self::Error>[src]
impl TryFrom<InputEvent> for UInputEvent[src]
type Error = RangeError
The type returned in the event of a conversion error.
pub fn try_from(event: InputEvent) -> Result<Self, Self::Error>[src]
Auto Trait Implementations
impl RefUnwindSafe for InputEvent
impl Send for InputEvent
impl Sync for InputEvent
impl Unpin for InputEvent
impl UnwindSafe for InputEvent
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,