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
sourceimpl EventCode
impl EventCode
pub fn iter(&self) -> EventCodeIteratorⓘNotable traits for EventCodeIteratorimpl Iterator for EventCodeIterator type Item = EventCode;
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
sourceimpl<'de> Deserialize<'de> for EventCode
impl<'de> Deserialize<'de> for EventCode
sourcefn 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
impl Copy for EventCode
impl Eq for EventCode
impl StructuralEq for EventCode
impl StructuralPartialEq for EventCode
Auto Trait Implementations
impl RefUnwindSafe for EventCode
impl Send for EventCode
impl Sync for EventCode
impl Unpin for EventCode
impl UnwindSafe for EventCode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more