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]

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());

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]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for Event
[src]

impl PartialEq for Event
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for Event
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Event

impl Sync for Event