[][src]Struct gaea::event::Ready

#[repr(transparent)]
pub struct Ready(_);

A set of readiness event kinds.

Ready is a set of operation descriptors indicating which kind of operation is ready to be performed. For example, Ready::READABLE indicates that the associated Evented handle is ready to perform a read operation.

Ready values can be combined together using the various bitwise operators, see examples below.

For high level documentation on polling and readiness, see poll.

Examples

use gaea::Ready;

let ready = Ready::READABLE | Ready::WRITABLE;

assert!(ready.is_readable());
assert!(ready.is_writable());
assert!(!ready.is_error());

Methods

impl Ready[src]

pub const EMPTY: Ready[src]

Empty set.

pub const READABLE: Ready[src]

Readable readiness.

pub const WRITABLE: Ready[src]

Writable readiness.

pub const ERROR: Ready[src]

Error readiness.

pub const TIMER: Ready[src]

Deadline was elapsed.

pub const HUP: Ready[src]

Hup readiness, this signal is Unix specific.

pub const fn contains(self, other: Ready) -> bool[src]

Whether or not all flags in other are contained within self.

pub const fn is_readable(self) -> bool[src]

Returns true if the value includes readable readiness.

pub const fn is_writable(self) -> bool[src]

Returns true if the value includes writable readiness.

pub const fn is_error(self) -> bool[src]

Returns true if the value includes error readiness.

pub const fn is_timer(self) -> bool[src]

Returns true if a deadline has elapsed.

pub const fn is_hup(self) -> bool[src]

Returns true if the value includes HUP readiness.

Trait Implementations

impl Eq for Ready[src]

impl Ord for Ready[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl PartialEq<Ready> for Ready[src]

impl Copy for Ready[src]

impl Clone for Ready[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialOrd<Ready> for Ready[src]

impl Debug for Ready[src]

impl BitOr<Ready> for Ready[src]

type Output = Self

The resulting type after applying the | operator.

impl BitOrAssign<Ready> for Ready[src]

impl Hash for Ready[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for Ready

impl Sync for Ready

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for 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.

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

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

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