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

Method fetch_events

src/uinput.rs:399–402  ·  view source on GitHub ↗

Fetches and returns events from the kernel ring buffer without doing synchronization on SYN_DROPPED. By default this will block until events are available. Typically, users will want to call this in a tight loop within a thread.

(&mut self)

Source from the content-addressed store, hash-verified

397 /// By default this will block until events are available. Typically, users will want to call
398 /// this in a tight loop within a thread.
399 pub fn fetch_events(&mut self) -> io::Result<impl Iterator<Item = InputEvent> + '_> {
400 self.fill_events()?;
401 Ok(self.event_buf.drain(..).map(InputEvent::from))
402 }
403
404 #[cfg(feature = "tokio")]
405 #[inline]

Callers 7

test_compensate_keysFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 1

fill_eventsMethod · 0.45

Tested by 5

test_compensate_keysFunction · 0.36
mainFunction · 0.36
mainFunction · 0.36