#[repr(C)]pub struct UInputEvent {
pub time: EventTime,
pub code: UInputKind,
pub value: i32,
/* private fields */
}
Expand description
A special event type used to send force-feedback events to uinput.
Fields§
§time: EventTime
The timestamp associated with the event.
code: UInputKind
The code of the event.
value: i32
The unique request ID.
Implementations§
Source§impl<'a> UInputEvent
impl<'a> UInputEvent
Sourcepub const fn new(time: EventTime, code: UInputKind, value: i32) -> Self
pub const fn new(time: EventTime, code: UInputKind, value: i32) -> Self
Creates a new event from the given code and value.
Sourcepub unsafe fn from_event<E: AsRef<input_event>>(event: &E) -> &Self
pub unsafe fn from_event<E: AsRef<input_event>>(event: &E) -> &Self
Reinterpret a generic event without checking for validity.
Sourcepub unsafe fn from_event_mut(event: &mut InputEvent) -> &mut Self
pub unsafe fn from_event_mut(event: &mut InputEvent) -> &mut Self
Reinterpret a mutable generic event without checking for validity.
Sourcepub fn into_event(self) -> InputEvent
pub fn into_event(self) -> InputEvent
A generic input event.
Sourcepub fn as_event(&self) -> &InputEvent
pub fn as_event(&self) -> &InputEvent
A generic input event reference.
Sourcepub unsafe fn as_event_mut(&mut self) -> &mut InputEvent
pub unsafe fn as_event_mut(&mut self) -> &mut InputEvent
A mutable generic input event reference.
Trait Implementations§
Source§impl AsRef<InputEvent> for UInputEvent
impl AsRef<InputEvent> for UInputEvent
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 AsRef<input_event> for UInputEvent
impl AsRef<input_event> for UInputEvent
Source§fn as_ref(&self) -> &input_event
fn as_ref(&self) -> &input_event
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for UInputEvent
impl Clone for UInputEvent
Source§fn clone(&self) -> UInputEvent
fn clone(&self) -> UInputEvent
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for UInputEvent
impl Debug for UInputEvent
Source§impl<'de> Deserialize<'de> for UInputEvent
impl<'de> Deserialize<'de> for UInputEvent
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<'a> From<&'a UInputEvent> for &'a InputEvent
impl<'a> From<&'a UInputEvent> for &'a InputEvent
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<&'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<&'a UInputEvent> for InputEvent
impl<'a> From<&'a UInputEvent> for InputEvent
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<&'a mut UInputEvent> for EventMut<'a>
impl<'a> From<&'a mut UInputEvent> for EventMut<'a>
Source§fn from(event: &'a mut UInputEvent) -> Self
fn from(event: &'a mut UInputEvent) -> 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 From<UInputEvent> for InputEvent
impl From<UInputEvent> for InputEvent
Source§fn from(event: UInputEvent) -> Self
fn from(event: UInputEvent) -> Self
Converts to this type from the input type.
Source§impl GenericEvent for UInputEvent
impl GenericEvent for UInputEvent
Source§fn event_kind(&self) -> EventKind
fn event_kind(&self) -> EventKind
The event kind.
Source§fn with_event(event: InputEvent) -> Result<Self, RangeError>
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
unsafe fn with_event_unchecked(event: InputEvent) -> Self
Interprets a generic event into a concrete event type. Read more
Source§fn from_ref(event: &InputEvent) -> Result<&Self, RangeError>
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>
fn from_mut(event: &mut InputEvent) -> Result<&mut Self, RangeError>
Interprets a mutable generic event reference into a concrete event type.
Source§impl Hash for UInputEvent
impl Hash for UInputEvent
Source§impl Ord for UInputEvent
impl Ord for UInputEvent
Source§fn cmp(&self, other: &UInputEvent) -> Ordering
fn cmp(&self, other: &UInputEvent) -> Ordering
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 PartialEq for UInputEvent
impl PartialEq for UInputEvent
Source§impl PartialOrd for UInputEvent
impl PartialOrd for UInputEvent
Source§impl Serialize for UInputEvent
impl Serialize for UInputEvent
Source§impl<'a> TryFrom<&'a InputEvent> for &'a UInputEvent
impl<'a> TryFrom<&'a InputEvent> for &'a UInputEvent
Source§type Error = RangeError
type Error = RangeError
The type returned in the event of a conversion error.
Source§impl<'a> TryFrom<&'a mut InputEvent> for &'a mut UInputEvent
impl<'a> TryFrom<&'a mut InputEvent> for &'a mut UInputEvent
Source§type Error = RangeError
type Error = RangeError
The type returned in the event of a conversion error.
Source§impl TryFrom<InputEvent> for UInputEvent
impl TryFrom<InputEvent> for UInputEvent
Source§type Error = RangeError
type Error = RangeError
The type returned in the event of a conversion error.
impl Copy for UInputEvent
impl Eq for UInputEvent
impl StructuralPartialEq for UInputEvent
Auto Trait Implementations§
impl Freeze for UInputEvent
impl RefUnwindSafe for UInputEvent
impl Send for UInputEvent
impl Sync for UInputEvent
impl Unpin for UInputEvent
impl UnwindSafe for UInputEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more