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

Method fetch_events

src/sync_stream.rs:349–358  ·  view source on GitHub ↗

Fetches and returns events from the kernel ring buffer, 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. Will insert "fake" events.

(&mut self)

Source from the content-addressed store, hash-verified

347 /// this in a tight loop within a thread.
348 /// Will insert "fake" events.
349 pub fn fetch_events(&mut self) -> io::Result<FetchEventsSynced<'_>> {
350 let sync = self.fetch_events_inner()?;
351
352 Ok(FetchEventsSynced {
353 dev: self,
354 range: 0..0,
355 consumed_to: 0,
356 sync,
357 })
358 }
359
360 #[cfg(feature = "tokio")]
361 pub fn into_event_stream(self) -> io::Result<EventStream> {

Callers

nothing calls this directly

Calls 1

fetch_events_innerMethod · 0.80

Tested by

no test coverage detected