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
Asserts that a type implementing std::io traits can be used as an async type.
Adds buffering to a reader.
Adds buffering to a writer.
Reader for the AsyncReadExt::bytes() method.
Reader for the AsyncReadExt::chain() method.
Future for the AsyncWriteExt::close() method.
Gives an in-memory buffer a cursor for reading and writing.
Future for the AsyncBufReadExt::fill_buf() method.
Future for the AsyncWriteExt::flush() method.
Stream for the AsyncBufReadExt::lines() method.
Future for the AsyncReadExt::read_exact() method.
Future for the AsyncReadExt::read() method.
Future for the AsyncBufReadExt::read_line() method.
Future for the AsyncReadExt::read_to_end() method.
Future for the AsyncReadExt::read_to_string() method.
Future for the AsyncBufReadExt::read_until() method.
Future for the AsyncReadExt::read_vectored() method.
Future for the AsyncSeekExt::seek() method.
Stream for the AsyncBufReadExt::split() method.
Reader for the AsyncReadExt::take() method.
Future for the AsyncWriteExt::write_all() method.
Future for the AsyncWriteExt::write() method.
Future for the AsyncWriteExt::write_vectored() method.
Enums
A list specifying general categories of I/O error.
Enumeration of possible methods to seek within an I/O object.
Traits
Read bytes asynchronously.
Extension trait for AsyncBufRead.
Read bytes asynchronously.
Extension trait for AsyncRead.
Seek bytes asynchronously.
Extension trait for AsyncSeek.
Write bytes asynchronously.
Extension trait for AsyncWrite.
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 Definitions
Type alias for Pin<Box<dyn AsyncRead + Send + 'static>>.
Type alias for Pin<Box<dyn AsyncWrite + Send + 'static>>.