Struct Ready
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.Describes the readiness state of an I/O resources.
Ready tracks which operation an I/O resource is ready to perform.
Implementations
impl Ready
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.
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.
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.
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.
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.
pub const PRIORITY: Ready
Returns a Ready representing priority readiness.
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.
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.
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());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());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());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());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());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());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
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.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.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.fn bitor_assign(&mut self, other: Ready)
|= operation. Read more
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.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.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.fn max(self, other: Self) -> Selfwhere Self: Sized,
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.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.Auto Trait Implementations
impl Freeze for Ready
impl RefUnwindSafe for Ready
impl Send for Ready
impl Sync for Ready
impl Unpin for Ready
impl UnsafeUnpin for Ready
impl UnwindSafe for Ready
Blanket Implementations
impl<T> BorrowMut<T> for Twhere T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Twhere T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)
impl<T> Instrument for T
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> WithSubscriber for T
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
MIT License
Copyright © Tokio Contributors
https://docs.rs/tokio/1.53.1/tokio/io/struct.Ready.html