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: InputDeviceEventThe device_event contains the device-specific input event information.
device_descriptor: InputDeviceDescriptorThe device_descriptor contains static information about the device that generated the
input event.
event_time: MonotonicInstantThe time in nanoseconds when the event was first recorded.
handled: HandledThe 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 duplicate 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§impl<T, D> Encode<Ambiguous1, D> for Twhere
    D: ResourceDialect,
 
impl<T, D> Encode<Ambiguous1, D> for Twhere
    D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
    D: ResourceDialect,
 
impl<T, D> Encode<Ambiguous2, D> for Twhere
    D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
 
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
 
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type 
T to [Self]§impl<T> IntoAny for T
 
impl<T> IntoAny for T
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more