joydev_rs/generic_event.rs
1/// Trait common to all events
2pub trait GenericEvent {
3 /// Returns `true` if the event is real
4 fn is_real(&self) -> bool;
5
6 /// Returns `true` if the event is synthetic
7 fn is_synthetic(&self) -> bool;
8
9 /// Returns the event's timestamp
10 fn time(&self) -> u32;
11
12 /// Returns the event's value
13 fn value(&self) -> i16;
14}