Struct Ready

struct Ready(_)

Describes the readiness state of an I/O resources.

Ready tracks which operation an I/O resource is ready to perform.

Implementations

impl Ready

fn is_empty(self: Self) -> bool

Returns true if Ready is the empty set.

Examples

use tokio::io::Ready;

assert!(Ready::EMPTY.is_empty());
assert!(!Ready::READABLE.is_empty());
fn is_readable(self: 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());
fn is_writable(self: 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());
fn is_read_closed(self: 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());
fn is_write_closed(self: 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());
fn is_priority(self: 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());
fn is_error(self: Self) -> bool

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());

impl BitAnd for Ready

fn bitand(self: Self, other: Ready) -> Ready

impl BitOr for Ready

fn bitor(self: Self, other: Ready) -> Ready

impl BitOrAssign for Ready

fn bitor_assign(self: &mut Self, other: Ready)

impl Clone for Ready

fn clone(self: &Self) -> Ready

impl Copy for Ready

impl Debug for Ready

fn fmt(self: &Self, fmt: &mut Formatter<'_>) -> Result

impl Eq for Ready

impl Freeze for Ready

impl Ord for Ready

fn cmp(self: &Self, other: &Ready) -> Ordering

impl PartialEq for Ready

fn eq(self: &Self, other: &Ready) -> bool

impl PartialOrd for Ready

fn partial_cmp(self: &Self, other: &Ready) -> Option<Ordering>

impl RefUnwindSafe for Ready

impl Send for Ready

impl StructuralPartialEq for Ready

impl Sub for Ready

fn sub(self: Self, other: Ready) -> Ready

impl Sync for Ready

impl Unpin for Ready

impl UnsafeUnpin for Ready

impl UnwindSafe for Ready

impl<T> Any for Ready

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Ready

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Ready

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for Ready

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for Ready

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Ready

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for Ready

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for Ready

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for Ready

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>