Struct mio::Events
[−]
[src]
pub struct Events { /* fields omitted */ }
A buffer for I/O events to get placed into, passed to Poll::poll
.
This structure is normally re-used on each turn of the event loop and will
contain any I/O events that happen during a poll
. After a call to poll
returns the various accessor methods on this structure can be used to
iterate over the underlying events that ocurred.
Methods
impl Events
[src]
fn with_capacity(capacity: usize) -> Events
Create a net blank set of events capable of holding up to capacity
events.
This parameter typically is an indicator on how many events can be returned each turn of the event loop, but it is not necessarily a hard limit across platforms.
fn get(&self, idx: usize) -> Option<Event>
Returns the idx
-th event.
Returns None
if idx
is greater than the length of this event buffer.
fn len(&self) -> usize
Returns how many events this buffer contains.
fn is_empty(&self) -> bool
Returns whether this buffer contains 0 events.