pub enum EventCode {
}
Variants§
EV_SYN(EV_SYN)
EV_KEY(EV_KEY)
EV_REL(EV_REL)
EV_ABS(EV_ABS)
EV_MSC(EV_MSC)
EV_SW(EV_SW)
EV_LED(EV_LED)
EV_SND(EV_SND)
EV_REP(EV_REP)
EV_FF(EV_FF)
EV_PWR
EV_FF_STATUS(EV_FF)
EV_UNK
EV_MAX
Implementations§
source§impl EventCode
impl EventCode
pub fn iter(&self) -> EventCodeIterator ⓘ
sourcepub fn from_str(ev_type: &EventType, name: &str) -> Option<EventCode>
pub fn from_str(ev_type: &EventType, name: &str) -> Option<EventCode>
Look up an event code by its type and name. Event codes start with a fixed prefix followed by their name (eg., “ABS_X”). The prefix must be included in the name. It returns the constant assigned to the event code or Errno if not found.
Trait Implementations§
source§impl<'de> Deserialize<'de> for EventCode
impl<'de> Deserialize<'de> for EventCode
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 PartialEq for EventCode
impl PartialEq for EventCode
impl Copy for EventCode
impl Eq for EventCode
impl StructuralPartialEq for EventCode
Auto Trait Implementations§
impl Freeze for EventCode
impl RefUnwindSafe for EventCode
impl Send for EventCode
impl Sync for EventCode
impl Unpin for EventCode
impl UnwindSafe for EventCode
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