Struct tokio::io::Ready [−][src]
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
Returns a Ready
representing read closed readiness.
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());
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());
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());
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());
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
Performs the |=
operation. Read more
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
Auto Trait Implementations
impl RefUnwindSafe for Ready
impl UnwindSafe for Ready
Blanket Implementations
Mutably borrows from an owned value. Read more