Expand description

Tools and combinators for I/O.

Examples

use futures_lite::io::{self, AsyncReadExt};

let input: &[u8] = b"hello";
let mut reader = io::BufReader::new(input);

let mut contents = String::new();
reader.read_to_string(&mut contents).await?;

Structs

Enums

  • A list specifying general categories of I/O error.
  • Enumeration of possible methods to seek within an I/O object.

Traits

Functions

  • Copies the entire contents of a reader into a writer.
  • Creates an empty reader.
  • Creates an infinite reader that reads the same byte repeatedly.
  • Creates a writer that consumes and drops all data.
  • Splits a stream into AsyncRead and AsyncWrite halves.

Type Aliases

  • Type alias for Pin<Box<dyn AsyncRead + Send + 'static>>.
  • Type alias for Pin<Box<dyn AsyncWrite + Send + 'static>>.
  • A specialized Result type for I/O operations.