Struct evdev_rs::InputEvent
source · pub struct InputEvent {
pub time: TimeVal,
pub event_code: EventCode,
pub value: i32,
}
Expand description
The event structure itself
Fields§
§time: TimeVal
The time at which event occured
event_code: EventCode
§value: i32
Implementations§
source§impl InputEvent
impl InputEvent
pub const fn new(timeval: &TimeVal, code: &EventCode, value: i32) -> InputEvent
pub fn event_type(&self) -> Option<EventType>
pub fn from_raw(event: &input_event) -> InputEvent
pub fn as_raw(&self) -> input_event
pub fn is_type(&self, ev_type: &EventType) -> bool
pub fn is_code(&self, code: &EventCode) -> bool
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<'de> Deserialize<'de> for InputEvent
impl<'de> Deserialize<'de> for InputEvent
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 Hash for InputEvent
impl Hash for InputEvent
source§impl PartialEq for InputEvent
impl PartialEq for InputEvent
source§fn eq(&self, other: &InputEvent) -> bool
fn eq(&self, other: &InputEvent) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for InputEvent
impl Serialize for InputEvent
impl Eq 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