pub struct Ready(/* private fields */);net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt 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 tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.
pub const EMPTY: Ready
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.Returns the empty Ready set.
Sourcepub const READABLE: Ready
Available on crate feature net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.
pub const READABLE: Ready
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.Returns a Ready representing readable readiness.
Sourcepub const WRITABLE: Ready
Available on crate feature net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.
pub const WRITABLE: Ready
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.Returns a Ready representing writable readiness.
Sourcepub const READ_CLOSED: Ready
Available on crate feature net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.
pub const READ_CLOSED: Ready
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.Returns a Ready representing read closed readiness.
Sourcepub const WRITE_CLOSED: Ready
Available on crate feature net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.
pub const WRITE_CLOSED: Ready
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.Returns a Ready representing write closed readiness.
Sourcepub const PRIORITY: Ready
Available on Android or Linux only.
pub const PRIORITY: Ready
Returns a Ready representing priority readiness.
Sourcepub const ERROR: Ready
Available on crate feature net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.
pub const ERROR: Ready
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.Returns a Ready representing error readiness.
Sourcepub const ALL: Ready
Available on (Android or Linux) and (crate feature net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal) only.
pub const ALL: Ready
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal) only.Returns a Ready representing readiness for all operations.
Sourcepub fn is_empty(self) -> bool
Available on crate feature net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.
pub fn is_empty(self) -> bool
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal 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 tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.
pub fn is_readable(self) -> bool
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal 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 tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.
pub fn is_writable(self) -> bool
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal 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 tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.
pub fn is_read_closed(self) -> bool
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal 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 tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.
pub fn is_write_closed(self) -> bool
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal 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 Android or Linux 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 tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.
pub fn is_error(self) -> bool
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal 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 tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.
impl BitAnd for Ready
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.Source§impl BitOr for Ready
Available on crate feature net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.
impl BitOr for Ready
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.Source§impl BitOrAssign for Ready
Available on crate feature net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.
impl BitOrAssign for Ready
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal 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 tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.
impl Clone for Ready
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.impl Copy for Ready
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.Source§impl Debug for Ready
Available on crate feature net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.
impl Debug for Ready
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.impl Eq for Ready
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.Source§impl Ord for Ready
Available on crate feature net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.
impl Ord for Ready
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for Ready
Available on crate feature net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.
impl PartialEq for Ready
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.Source§impl PartialOrd for Ready
Available on crate feature net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.
impl PartialOrd for Ready
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.impl StructuralPartialEq for Ready
net, or tokio_unstable and Linux and crate feature fs and crate feature io-uring and crate feature rt, or Unix and crate feature process, or Unix and crate feature signal only.