Struct tokio::io::Ready [−][src]
pub struct Ready(_);
net
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
impl Ready
[src]
impl Ready
[src]pub const READ_CLOSED: Ready
[src]
pub const READ_CLOSED: Ready
[src]Returns a Ready
representing read closed readiness.
pub const WRITE_CLOSED: Ready
[src]
pub const WRITE_CLOSED: Ready
[src]Returns a Ready
representing write closed readiness.
pub fn is_empty(self) -> bool
[src]
pub fn is_empty(self) -> bool
[src]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
[src]
pub fn is_readable(self) -> bool
[src]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
[src]
pub fn is_writable(self) -> bool
[src]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
[src]
pub fn is_read_closed(self) -> bool
[src]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
[src]
pub fn is_write_closed(self) -> bool
[src]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
impl BitOrAssign<Ready> for Ready
[src]
impl BitOrAssign<Ready> for Ready
[src]fn bitor_assign(&mut self, other: Ready)
[src]
fn bitor_assign(&mut self, other: Ready)
[src]Performs the |=
operation. Read more
impl PartialOrd<Ready> for Ready
[src]
impl PartialOrd<Ready> for Ready
[src]fn partial_cmp(&self, other: &Ready) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Ready) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for Ready
[src]
impl StructuralPartialEq for Ready
[src]
Auto Trait Implementations
impl RefUnwindSafe for Ready
impl Send for Ready
impl Sync for Ready
impl Unpin for Ready
impl UnwindSafe for Ready
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more