pub struct Ready(/* private fields */);net, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.Expand description
Describes the readiness state of an I/O resources.
Ready tracks which operation an I/O resource is ready to perform.
Implementations§
Source§impl Ready
impl Ready
Sourcepub const EMPTY: Ready
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
pub const EMPTY: Ready
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.Returns the empty Ready set.
Sourcepub const READABLE: Ready
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
pub const READABLE: Ready
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.Returns a Ready representing readable readiness.
Sourcepub const WRITABLE: Ready
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
pub const WRITABLE: Ready
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.Returns a Ready representing writable readiness.
Sourcepub const READ_CLOSED: Ready
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
pub const READ_CLOSED: Ready
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.Returns a Ready representing read closed readiness.
Sourcepub const WRITE_CLOSED: Ready
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
pub const WRITE_CLOSED: Ready
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.Returns a Ready representing write closed readiness.
Sourcepub const PRIORITY: Ready
Available on Linux or Android only.
pub const PRIORITY: Ready
Returns a Ready representing priority readiness.
Sourcepub const ERROR: Ready
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
pub const ERROR: Ready
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.Returns a Ready representing error readiness.
Sourcepub const ALL: Ready
Available on (crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux) and (Linux or Android) only.
pub const ALL: Ready
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux) and (Linux or Android) only.Returns a Ready representing readiness for all operations.
Sourcepub fn is_empty(self) -> bool
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
pub fn is_empty(self) -> bool
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.Returns true if Ready is the empty set.
§Examples
use tokio::io::Ready;
assert!(Ready::EMPTY.is_empty());
assert!(!Ready::READABLE.is_empty());Sourcepub fn is_readable(self) -> bool
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
pub fn is_readable(self) -> bool
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.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());Sourcepub fn is_writable(self) -> bool
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
pub fn is_writable(self) -> bool
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.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());Sourcepub fn is_read_closed(self) -> bool
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
pub fn is_read_closed(self) -> bool
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.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());Sourcepub fn is_write_closed(self) -> bool
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
pub fn is_write_closed(self) -> bool
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.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());Sourcepub fn is_priority(self) -> bool
Available on Linux or Android only.
pub fn is_priority(self) -> bool
Returns true if the value includes priority readiness.
§Examples
use tokio::io::Ready;
assert!(!Ready::EMPTY.is_priority());
assert!(!Ready::WRITABLE.is_priority());
assert!(Ready::PRIORITY.is_priority());Sourcepub fn is_error(self) -> bool
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
pub fn is_error(self) -> bool
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.Returns true if the value includes error readiness.
§Examples
use tokio::io::Ready;
assert!(!Ready::EMPTY.is_error());
assert!(!Ready::WRITABLE.is_error());
assert!(Ready::ERROR.is_error());Trait Implementations§
Source§impl BitAnd for Ready
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
impl BitAnd for Ready
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.Source§impl BitOr for Ready
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
impl BitOr for Ready
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.Source§impl BitOrAssign for Ready
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
impl BitOrAssign for Ready
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.Source§fn bitor_assign(&mut self, other: Ready)
fn bitor_assign(&mut self, other: Ready)
|= operation. Read moreSource§impl Clone for Ready
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
impl Clone for Ready
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.Source§impl Debug for Ready
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
impl Debug for Ready
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.Source§impl Ord for Ready
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
impl Ord for Ready
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.Source§impl PartialEq for Ready
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
impl PartialEq for Ready
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.Source§impl PartialOrd for Ready
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
impl PartialOrd for Ready
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.Source§impl Sub for Ready
Available on crate feature net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.
impl Sub for Ready
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.impl Copy for Ready
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.impl Eq for Ready
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.impl StructuralPartialEq for Ready
net, or Unix and crate feature process, or Unix and crate feature signal, or tokio_unstable and crate feature io-uring and crate feature rt and crate feature fs and Linux only.