MCPcopy Create free account
hub / github.com/emberian/evdev / destructure

Method destructure

src/lib.rs:411–413  ·  view source on GitHub ↗

A convenience function to destructure the InputEvent into a [`EventSummary`]. # Example ``` use evdev::*; let event = InputEvent::new(1, KeyCode::KEY_A.0, 1); match event.destructure() { EventSummary::Key(KeyEvent, KeyCode::KEY_A, 1) => (), _=> panic!(), } ```

(self)

Source from the content-addressed store, hash-verified

409 /// }
410 /// ```
411 pub fn destructure(self) -> EventSummary {
412 self.into()
413 }
414
415 /// Create a new InputEvent. Only really useful for emitting events on virtual devices.
416 pub fn new(type_: u16, code: u16, value: i32) -> Self {

Callers 5

fmtMethod · 0.45
sync_eventsFunction · 0.45
process_eventMethod · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected