Struct InputEvent

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

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§

Source§

impl InputEvent

Source

pub const fn zeroed() -> Self

Constructs an empty event.

Source

pub fn with_raw(event: input_event) -> Result<Self, RangeError>

Reinterprets a raw input_event.

Source

pub unsafe fn with_raw_unchecked(event: input_event) -> Self

Reinterprets a raw input_event.

§Safety

The input event must have a valid event kind.

Source

pub fn into_bytes(self) -> [u8; 16]

Reinterpret this event as an array of bytes.

Source

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

Reinterpret this event as a byte slice.

Source

pub unsafe fn as_bytes_mut(&mut self) -> &mut [u8; 16]

Reinterpret this event as a mutable byte slice.

Source§

impl InputEvent

Source

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

Reinterprets a raw input_event reference.

Source

pub unsafe fn from_raw_unchecked(event: &input_event) -> &Self

Reinterprets a raw input_event reference.

§Safety

The input event must have a valid event kind.

Source

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

Reinterprets a raw input_event into a mutable reference.

Source

pub unsafe fn from_raw_mut_unchecked(event: &mut input_event) -> &mut Self

Reinterprets a raw input_event into a mutable reference.

§Safety

The input event must have a valid event kind.

Source

pub fn into_raw(self) -> input_event

Reinterprets the event as a raw input_event.

Source

pub fn as_raw(&self) -> &input_event

Reinterprets the event as a raw input_event reference.

Source

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

Reinterprets the event as a mutable raw input_event.

Trait Implementations§

Source§

impl AsRef<InputEvent> for AbsoluteEvent

Source§

fn as_ref(&self) -> &InputEvent

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<InputEvent> for AutorepeatEvent

Source§

fn as_ref(&self) -> &InputEvent

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<InputEvent> for Event

Source§

fn as_ref(&self) -> &InputEvent

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<'a> AsRef<InputEvent> for EventMut<'a>

Source§

fn as_ref(&self) -> &InputEvent

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<'a> AsRef<InputEvent> for EventRef<'a>

Source§

fn as_ref(&self) -> &InputEvent

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<InputEvent> for ForceFeedbackEvent

Source§

fn as_ref(&self) -> &InputEvent

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<InputEvent> for ForceFeedbackStatusEvent

Source§

fn as_ref(&self) -> &InputEvent

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<InputEvent> for InputEvent

Source§

fn as_ref(&self) -> &InputEvent

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<InputEvent> for KeyEvent

Source§

fn as_ref(&self) -> &InputEvent

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<InputEvent> for LedEvent

Source§

fn as_ref(&self) -> &InputEvent

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<InputEvent> for MiscEvent

Source§

fn as_ref(&self) -> &InputEvent

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<InputEvent> for RelativeEvent

Source§

fn as_ref(&self) -> &InputEvent

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<InputEvent> for SoundEvent

Source§

fn as_ref(&self) -> &InputEvent

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<InputEvent> for SwitchEvent

Source§

fn as_ref(&self) -> &InputEvent

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<InputEvent> for SynchronizeEvent

Source§

fn as_ref(&self) -> &InputEvent

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<InputEvent> for UInputEvent

Source§

fn as_ref(&self) -> &InputEvent

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<input_event> for InputEvent

Source§

fn as_ref(&self) -> &input_event

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for InputEvent

Source§

fn clone(&self) -> InputEvent

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InputEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for InputEvent

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Encoder<InputEvent> for EventCodec

Available on crate features tokio-util-0_6 and codec only.
§

type Error = Error

The type of encoding errors. Read more
§

fn encode( &mut self, item: InputEvent, dst: &mut BytesMut, ) -> Result<(), Self::Error>

Encodes a frame into the buffer provided. Read more
§

impl Encoder<InputEvent> for EventCodec

Available on crate features tokio-util-0_7 and codec only.
§

type Error = Error

The type of encoding errors. Read more
§

fn encode( &mut self, item: InputEvent, dst: &mut BytesMut, ) -> Result<(), Self::Error>

Encodes a frame into the buffer provided. Read more
Source§

impl<'a> From<&'a AbsoluteEvent> for &'a InputEvent

Source§

fn from(event: &'a AbsoluteEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a AbsoluteEvent> for InputEvent

Source§

fn from(event: &'a AbsoluteEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a AutorepeatEvent> for &'a InputEvent

Source§

fn from(event: &'a AutorepeatEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a AutorepeatEvent> for InputEvent

Source§

fn from(event: &'a AutorepeatEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a, 'b> From<&'a EventMut<'b>> for &'a InputEvent

Source§

fn from(event: &'a EventMut<'b>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a ForceFeedbackEvent> for &'a InputEvent

Source§

fn from(event: &'a ForceFeedbackEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a ForceFeedbackEvent> for InputEvent

Source§

fn from(event: &'a ForceFeedbackEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a ForceFeedbackStatusEvent> for &'a InputEvent

Source§

fn from(event: &'a ForceFeedbackStatusEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a ForceFeedbackStatusEvent> for InputEvent

Source§

fn from(event: &'a ForceFeedbackStatusEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a InputEvent> for &'a input_event

Source§

fn from(event: &'a InputEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a KeyEvent> for &'a InputEvent

Source§

fn from(event: &'a KeyEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a KeyEvent> for InputEvent

Source§

fn from(event: &'a KeyEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a LedEvent> for &'a InputEvent

Source§

fn from(event: &'a LedEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a LedEvent> for InputEvent

Source§

fn from(event: &'a LedEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a MiscEvent> for &'a InputEvent

Source§

fn from(event: &'a MiscEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a MiscEvent> for InputEvent

Source§

fn from(event: &'a MiscEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a RelativeEvent> for &'a InputEvent

Source§

fn from(event: &'a RelativeEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a RelativeEvent> for InputEvent

Source§

fn from(event: &'a RelativeEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a SoundEvent> for &'a InputEvent

Source§

fn from(event: &'a SoundEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a SoundEvent> for InputEvent

Source§

fn from(event: &'a SoundEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a SwitchEvent> for &'a InputEvent

Source§

fn from(event: &'a SwitchEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a SwitchEvent> for InputEvent

Source§

fn from(event: &'a SwitchEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a SynchronizeEvent> for &'a InputEvent

Source§

fn from(event: &'a SynchronizeEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a SynchronizeEvent> for InputEvent

Source§

fn from(event: &'a SynchronizeEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a UInputEvent> for &'a InputEvent

Source§

fn from(event: &'a UInputEvent) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a UInputEvent> for InputEvent

Source§

fn from(event: &'a UInputEvent) -> Self

Converts to this type from the input type.
Source§

impl From<AbsoluteEvent> for InputEvent

Source§

fn from(event: AbsoluteEvent) -> Self

Converts to this type from the input type.
Source§

impl From<AutorepeatEvent> for InputEvent

Source§

fn from(event: AutorepeatEvent) -> Self

Converts to this type from the input type.
Source§

impl From<Event> for InputEvent

Source§

fn from(event: Event) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<EventMut<'a>> for &'a InputEvent

Source§

fn from(event: EventMut<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<EventRef<'a>> for &'a InputEvent

Source§

fn from(event: EventRef<'a>) -> Self

Converts to this type from the input type.
Source§

impl From<ForceFeedbackEvent> for InputEvent

Source§

fn from(event: ForceFeedbackEvent) -> Self

Converts to this type from the input type.
Source§

impl From<ForceFeedbackStatusEvent> for InputEvent

Source§

fn from(event: ForceFeedbackStatusEvent) -> Self

Converts to this type from the input type.
Source§

impl From<InputEvent> for Event

Source§

fn from(event: InputEvent) -> Self

Converts to this type from the input type.
Source§

impl From<InputEvent> for input_event

Source§

fn from(event: InputEvent) -> Self

Converts to this type from the input type.
Source§

impl From<KeyEvent> for InputEvent

Source§

fn from(event: KeyEvent) -> Self

Converts to this type from the input type.
Source§

impl From<LedEvent> for InputEvent

Source§

fn from(event: LedEvent) -> Self

Converts to this type from the input type.
Source§

impl From<MiscEvent> for InputEvent

Source§

fn from(event: MiscEvent) -> Self

Converts to this type from the input type.
Source§

impl From<RelativeEvent> for InputEvent

Source§

fn from(event: RelativeEvent) -> Self

Converts to this type from the input type.
Source§

impl From<SoundEvent> for InputEvent

Source§

fn from(event: SoundEvent) -> Self

Converts to this type from the input type.
Source§

impl From<SwitchEvent> for InputEvent

Source§

fn from(event: SwitchEvent) -> Self

Converts to this type from the input type.
Source§

impl From<SynchronizeEvent> for InputEvent

Source§

fn from(event: SynchronizeEvent) -> Self

Converts to this type from the input type.
Source§

impl From<UInputEvent> for InputEvent

Source§

fn from(event: UInputEvent) -> Self

Converts to this type from the input type.
Source§

impl GenericEvent for InputEvent

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.
Source§

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

Interprets a generic event into a concrete event type.
Source§

unsafe fn with_event_unchecked(event: InputEvent) -> Self

Interprets a generic event into a concrete event type. Read more
Source§

impl Hash for InputEvent

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for InputEvent

Source§

fn cmp(&self, other: &InputEvent) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for InputEvent

Source§

fn eq(&self, other: &InputEvent) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for InputEvent

Source§

fn partial_cmp(&self, other: &InputEvent) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for InputEvent

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'a> TryFrom<&'a InputEvent> for &'a AbsoluteEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a InputEvent> for &'a AutorepeatEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a InputEvent> for &'a ForceFeedbackEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a InputEvent> for &'a ForceFeedbackStatusEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a InputEvent> for &'a KeyEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a InputEvent> for &'a LedEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a InputEvent> for &'a MiscEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a InputEvent> for &'a RelativeEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a InputEvent> for &'a SoundEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a InputEvent> for &'a SwitchEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a InputEvent> for &'a SynchronizeEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a InputEvent> for &'a UInputEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a input_event> for &'a InputEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a input_event) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut AbsoluteEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut AutorepeatEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut ForceFeedbackEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut ForceFeedbackStatusEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut KeyEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut LedEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut MiscEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut RelativeEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut SoundEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut SwitchEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut SynchronizeEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a mut InputEvent> for &'a mut UInputEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a mut InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a mut input_event> for &'a mut InputEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: &'a mut input_event) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputEvent> for AbsoluteEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputEvent> for AutorepeatEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputEvent> for ForceFeedbackEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputEvent> for ForceFeedbackStatusEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputEvent> for KeyEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputEvent> for LedEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputEvent> for MiscEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputEvent> for RelativeEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputEvent> for SoundEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputEvent> for SwitchEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputEvent> for SynchronizeEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<InputEvent> for UInputEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: InputEvent) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<input_event> for InputEvent

Source§

type Error = RangeError

The type returned in the event of a conversion error.
Source§

fn try_from(event: input_event) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Copy for InputEvent

Source§

impl Eq for InputEvent

Source§

impl StructuralPartialEq for InputEvent

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,