Struct mio::event::Event [−][src]
pub struct Event { /* fields omitted */ }
Expand description
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));
Implementations
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));
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());
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Event
impl UnwindSafe for Event
Blanket Implementations
Mutably borrows from an owned value. Read more