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]

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

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

[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]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for Event
[src]

impl PartialEq for Event
[src]

[src]

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

[src]

This method tests for !=.

impl Debug for Event
[src]

[src]

Formats the value using the given formatter.