Struct mio::event::Event
[−]
[src]
pub struct Event { /* fields omitted */ }
An readiness event returned by Poll::poll
.
Event
is a readiness state paired with a Token
. It is returned by
Poll::poll
.
For more documentation on polling and events, see Poll
.
Examples
use mio::{Ready, Token}; use mio::event::Event; let event = Event::new(Ready::readable() | Ready::writable(), Token(0)); assert_eq!(event.readiness(), Ready::readable() | Ready::writable()); assert_eq!(event.token(), Token(0));
Methods
impl Event
[src]
fn new(readiness: Ready, token: Token) -> Event
[src]
Creates a new Event
containing readiness
and token
Examples
use mio::{Ready, Token}; use mio::event::Event; let event = Event::new(Ready::readable() | Ready::writable(), Token(0)); assert_eq!(event.readiness(), Ready::readable() | Ready::writable()); assert_eq!(event.token(), Token(0));
fn readiness(&self) -> Ready
[src]
Returns the event's readiness.
Examples
use mio::{Ready, Token}; use mio::event::Event; let event = Event::new(Ready::readable() | Ready::writable(), Token(0)); assert_eq!(event.readiness(), Ready::readable() | Ready::writable());
fn token(&self) -> Token
[src]
Returns the event's token.
Examples
use mio::{Ready, Token}; use mio::event::Event; let event = Event::new(Ready::readable() | Ready::writable(), Token(0)); assert_eq!(event.token(), Token(0));
Trait Implementations
impl Copy for Event
[src]
impl Clone for Event
[src]
fn clone(&self) -> Event
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for Event
[src]
impl PartialEq for Event
[src]
fn eq(&self, __arg_0: &Event) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Event) -> bool
[src]
This method tests for !=
.