Struct event::EventQueue [] [src]

pub struct EventQueue<R> { /* fields omitted */ }

Methods

impl<R> EventQueue<R>
[src]

Create a new event queue

Add a file to the event queue, calling a callback when an event occurs

The callback is given a mutable reference to the file and the event data (typically the length of data available for read)

The callback returns Ok(None) if it wishes to continue the event loop, or Ok(Some(R)) to break the event loop and return the value. Err can be used to allow the callback to return an I/O error, and break the event loop

Remove a file from the event queue, returning its callback if found

Send an event to a descriptor callback

Send an event to all descriptor callbacks, useful for cleaning out buffers after init

Process the event queue until a callback returns Some(R)