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
.
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));
Creates a new Event
containing readiness
and token
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));
Returns the event's readiness.
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());
Returns the event's token.
use mio::{Ready, Token};
use mio::event::Event;
let event = Event::new(Ready::readable() | Ready::writable(), Token(0));
assert_eq!(event.token(), Token(0));
Performs copy-assignment from source
. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Formats the value using the given formatter. Read more