[][src]Struct polling::Event

pub struct Event {
    pub key: usize,
    pub readable: bool,
    pub writable: bool,
}

Indicates that a file descriptor or socket can read or write without blocking.

Fields

key: usize

Key identifying the file descriptor or socket.

readable: bool

Can it do a read operation without blocking?

writable: bool

Can it do a write operation without blocking?

Implementations

impl Event[src]

pub fn all(key: usize) -> Event[src]

All kinds of events (readable and writable).

Equivalent to: Event { key, readable: true, writable: true }

pub fn readable(key: usize) -> Event[src]

Only the readable event.

Equivalent to: Event { key, readable: true, writable: false }

pub fn writable(key: usize) -> Event[src]

Only the writable event.

Equivalent to: Event { key, readable: false, writable: true }

pub fn none(key: usize) -> Event[src]

No events.

Equivalent to: Event { key, readable: false, writable: false }

Trait Implementations

impl Debug for Event[src]

Auto Trait Implementations

impl RefUnwindSafe for Event

impl Send for Event

impl Sync for Event

impl Unpin for Event

impl UnwindSafe for Event

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.