pub struct Ready(_);
Expand description
Describes the readiness state of an I/O resources.
Ready
tracks which operation an I/O resource is ready to perform.
Implementations
impl Ready
impl Ready
pub const READ_CLOSED: Ready
pub const READ_CLOSED: Ready
Returns a Ready
representing read closed readiness.
pub const WRITE_CLOSED: Ready
pub const WRITE_CLOSED: Ready
Returns a Ready
representing write closed readiness.
Returns true if Ready
is the empty set.
Examples
use tokio::io::Ready;
assert!(Ready::EMPTY.is_empty());
assert!(!Ready::READABLE.is_empty());
pub fn is_readable(self) -> bool
pub fn is_readable(self) -> bool
Returns true
if the value includes readable
.
Examples
use tokio::io::Ready;
assert!(!Ready::EMPTY.is_readable());
assert!(Ready::READABLE.is_readable());
assert!(Ready::READ_CLOSED.is_readable());
assert!(!Ready::WRITABLE.is_readable());
pub fn is_writable(self) -> bool
pub fn is_writable(self) -> bool
Returns true
if the value includes writable readiness
.
Examples
use tokio::io::Ready;
assert!(!Ready::EMPTY.is_writable());
assert!(!Ready::READABLE.is_writable());
assert!(Ready::WRITABLE.is_writable());
assert!(Ready::WRITE_CLOSED.is_writable());
pub fn is_read_closed(self) -> bool
pub fn is_read_closed(self) -> bool
Returns true
if the value includes read-closed readiness
.
Examples
use tokio::io::Ready;
assert!(!Ready::EMPTY.is_read_closed());
assert!(!Ready::READABLE.is_read_closed());
assert!(Ready::READ_CLOSED.is_read_closed());
pub fn is_write_closed(self) -> bool
pub fn is_write_closed(self) -> bool
Returns true
if the value includes write-closed readiness
.
Examples
use tokio::io::Ready;
assert!(!Ready::EMPTY.is_write_closed());
assert!(!Ready::WRITABLE.is_write_closed());
assert!(Ready::WRITE_CLOSED.is_write_closed());
Trait Implementations
impl BitOrAssign<Ready> for Ready
impl BitOrAssign<Ready> for Ready
pub fn bitor_assign(&mut self, other: Ready)
pub fn bitor_assign(&mut self, other: Ready)
Performs the |=
operation. Read more
impl PartialOrd<Ready> for Ready
impl PartialOrd<Ready> for Ready
pub fn partial_cmp(&self, other: &Ready) -> Option<Ordering>
pub fn partial_cmp(&self, other: &Ready) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl StructuralPartialEq for Ready
Auto Trait Implementations
impl RefUnwindSafe for Ready
impl UnwindSafe for Ready
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more