# [−] [src] Struct tokio::io::Ready

    pub 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` [src]

#### `pub const EMPTY: Ready` [src]

Returns the empty `Ready` set.

#### `pub const READABLE: Ready` [src]

Returns a `Ready` representing readable readiness.

#### `pub const WRITABLE: Ready` [src]

Returns a `Ready` representing writable readiness.

#### `pub const READ_CLOSED: Ready` [src]

Returns a `Ready` representing read closed readiness.

#### `pub const WRITE_CLOSED: Ready` [src]

Returns a `Ready` representing write closed readiness.

#### `pub const ALL: Ready` [src]

Returns a `Ready` representing readiness for all operations.

#### `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]

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]

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]

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]

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 BitAnd<Ready> for Ready` [src]

#### `type Output = Ready`

The resulting type after applying the `&` operator.

#### `fn bitand(self, other: Ready) -> Ready` [src]

Performs the `&` operation. Read more

### `impl BitOr<Ready> for Ready` [src]

#### `type Output = Ready`

The resulting type after applying the `|` operator.

#### `fn bitor(self, other: Ready) -> Ready` [src]

Performs the `|` operation. Read more

### `impl BitOrAssign<Ready> for Ready` [src]

#### `fn bitor_assign(&mut self, other: Ready)` [src]

Performs the `|=` operation. Read more

### `impl Clone for Ready` [src]

#### `fn clone(&self) -> Ready` [src]

Returns a copy of the value. Read more

#### `fn clone_from(&mut self, source: &Self)`1.0.0 [src]

Performs copy-assignment from `source`. Read more

### `impl Copy for Ready` [src]

### `impl Debug for Ready` [src]

#### `fn fmt(&self, fmt: &mut Formatter<'_>) -> Result` [src]

Formats the value using the given formatter. Read more

### `impl PartialEq<Ready> for Ready` [src]

#### `fn eq(&self, other: &Ready) -> bool` [src]

This method tests for `self` and `other` values to be equal, and is used by `==`. Read more

#### `fn ne(&self, other: &Ready) -> bool` [src]

This method tests for `!=`.

### `impl PartialOrd<Ready> for Ready` [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

#### `fn lt(&self, other: &Ready) -> bool` [src]

This method tests less than (for `self` and `other`) and is used by the `<` operator. Read more

#### `fn le(&self, other: &Ready) -> bool` [src]

This method tests less than or equal to (for `self` and `other`) and is used by the `<=` operator. Read more

#### `fn gt(&self, other: &Ready) -> bool` [src]

This method tests greater than (for `self` and `other`) and is used by the `>` operator. Read more

#### `fn ge(&self, other: &Ready) -> bool` [src]

This method tests greater than or equal to (for `self` and `other`) and is used by the `>=` operator. Read more

### `impl StructuralPartialEq for Ready` [src]

### `impl Sub<Ready> for Ready` [src]

#### `type Output = Ready`

The resulting type after applying the `-` operator.

#### `fn sub(self, other: Ready) -> Ready` [src]

Performs the `-` operation. Read more

## 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> Any for T where
T: 'static + ?Sized,` [src]

#### `pub fn type_id(&self) -> TypeId` [src]

Gets the `TypeId` of `self`. Read more

### `impl<T> Borrow<T> for T where
T: ?Sized,` [src]

#### `pub fn borrow(&self) -> &Tⓘ

### Notable traits for &'_ mut F

`impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;`
` [src]

Immutably borrows from an owned value. Read more

### `impl<T> BorrowMut<T> for T where
T: ?Sized,` [src]

#### `pub fn borrow_mut(&mut self) -> &mut Tⓘ

### Notable traits for &'_ mut F

`impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;`
` [src]

Mutably borrows from an owned value. Read more

### `impl<T> From<T> for T` [src]

#### `pub fn from(t: T) -> T` [src]

Performs the conversion.

### `impl<T, U> Into<U> for T where
U: From<T>,` [src]

#### `pub fn into(self) -> U` [src]

Performs the conversion.

### `impl<T> ToOwned for T where
T: Clone,` [src]

#### `type Owned = T`

The resulting type after obtaining ownership.

#### `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]

🔬 This is a nightly-only experimental API. (`toowned_clone_into`)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

### `impl<T, U> TryFrom<U> for T where
U: Into<T>,` [src]

#### `type Error = Infallible`

The type returned in the event of a conversion error.

#### `pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>` [src]

Performs the conversion.

### `impl<T, U> TryInto<U> for T where
U: TryFrom<T>,` [src]

#### `type Error = <U as TryFrom<T>>::Error`

The type returned in the event of a conversion error.

#### `pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>` [src]

Performs the conversion.