pub struct InputEvent {
pub device_event: InputDeviceEvent,
pub device_descriptor: InputDeviceDescriptor,
pub event_time: MonotonicInstant,
pub handled: Handled,
pub trace_id: Option<Id>,
}
Expand description
An InputEvent
holds information about an input event and the device that produced the event.
Fields§
§device_event: InputDeviceEvent
The device_event
contains the device-specific input event information.
device_descriptor: InputDeviceDescriptor
The device_descriptor
contains static information about the device that generated the
input event.
event_time: MonotonicInstant
The time in nanoseconds when the event was first recorded.
handled: Handled
The handled state of the event.
trace_id: Option<Id>
Implementations§
Source§impl InputEvent
impl InputEvent
Sourcepub fn into_with_event_time(self, event_time: MonotonicInstant) -> Self
pub fn into_with_event_time(self, event_time: MonotonicInstant) -> Self
Returns the same event, with modified event time.
Sourcepub fn is_handled(&self) -> bool
pub fn is_handled(&self) -> bool
Returns true if this event is marked as handled.
pub fn get_event_type(&self) -> &'static str
pub fn record_inspect(&self, node: &Node)
Trait Implementations§
Source§impl Clone for InputEvent
impl Clone for InputEvent
Source§fn clone(&self) -> InputEvent
fn clone(&self) -> InputEvent
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 InputEvent
impl Debug for InputEvent
Source§impl From<UnhandledInputEvent> for InputEvent
impl From<UnhandledInputEvent> for InputEvent
Source§fn from(event: UnhandledInputEvent) -> Self
fn from(event: UnhandledInputEvent) -> Self
Converts to this type from the input type.
Source§impl PartialEq for InputEvent
impl PartialEq for InputEvent
impl StructuralPartialEq for InputEvent
Auto Trait Implementations§
impl Freeze for InputEvent
impl !RefUnwindSafe for InputEvent
impl Send for InputEvent
impl Sync for InputEvent
impl Unpin for InputEvent
impl !UnwindSafe for InputEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)