#[repr(transparent)]pub struct Ready(_);
Expand description
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 Poller
.
Examples
use mio_st::event::Ready;
let ready = Ready::READABLE | Ready::WRITABLE;
assert!(ready.is_readable());
assert!(ready.is_writable());
assert!(!ready.is_error());
Implementations§
source§impl Ready
impl Ready
sourcepub const TIMER: Ready = _
pub const TIMER: Ready = _
Deadline was elapsed, see Poller.add_deadline
.
sourcepub fn contains(self, other: Ready) -> bool
pub fn contains(self, other: Ready) -> bool
Whether or not all flags in other
are contained within self
.
sourcepub fn is_readable(self) -> bool
pub fn is_readable(self) -> bool
Returns true if the value includes readable readiness.
sourcepub fn is_writable(self) -> bool
pub fn is_writable(self) -> bool
Returns true if the value includes writable readiness.
Trait Implementations§
source§impl BitOrAssign<Ready> for Ready
impl BitOrAssign<Ready> for Ready
source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|=
operation. Read moresource§impl Ord for Ready
impl Ord for Ready
source§impl PartialOrd<Ready> for Ready
impl PartialOrd<Ready> for Ready
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more