pub struct Context { /* private fields */ }
Implementations§
source§impl Context
impl Context
pub fn new() -> Result<Context>
sourcepub fn wait_for_event_raw(&mut self, timeout_ms: usize) -> Result<String>
pub fn wait_for_event_raw(&mut self, timeout_ms: usize) -> Result<String>
Waits for an event using poll(), reads it but does not parse
sourcepub fn wait_for_event<'a>(&mut self, timeout_ms: usize) -> Result<Event>
pub fn wait_for_event<'a>(&mut self, timeout_ms: usize) -> Result<Event>
Waits for an event using poll(), reads and parses it
sourcepub fn fd(&self) -> RawFd
pub fn fd(&self) -> RawFd
Returns the devd socket file descriptor in case you want to select/poll on it together with other file descriptors
sourcepub fn read_event(&mut self) -> Result<Event>
pub fn read_event(&mut self) -> Result<Event>
Reads an event and parses it. Use when polling on the raw fd by yourself