Module futures_lite::io [−][src]
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?;
Re-exports
| pub use std::io::Error; | |
| pub use std::io::ErrorKind; | |
| pub use std::io::Result; | |
| pub use std::io::SeekFrom; | |
| pub use futures_io::AsyncBufRead; | |
| pub use futures_io::AsyncRead; | |
| pub use futures_io::AsyncSeek; | |
| pub use futures_io::AsyncWrite; | 
Structs
| AssertAsync | Asserts that a type implementing  | 
| BlockOn | Blocks on all async I/O operations and implements  | 
| BufReader | Adds buffering to a reader. | 
| BufWriter | Adds buffering to a writer. | 
| Bytes | Reader for the  | 
| Chain | Reader for the  | 
| CloseFuture | Future for the  | 
| Cursor | Gives an in-memory buffer a cursor for reading and writing. | 
| Empty | Reader for the  | 
| FillBuf | Future for the  | 
| FlushFuture | Future for the  | 
| Lines | Stream for the  | 
| ReadExactFuture | Future for the  | 
| ReadFuture | Future for the  | 
| ReadHalf | The read half returned by  | 
| ReadLineFuture | Future for the  | 
| ReadToEndFuture | Future for the  | 
| ReadToStringFuture | Future for the  | 
| ReadUntilFuture | Future for the  | 
| ReadVectoredFuture | Future for the  | 
| Repeat | Reader for the  | 
| SeekFuture | Future for the  | 
| Sink | Writer for the  | 
| Split | Stream for the  | 
| Take | Reader for the  | 
| WriteAllFuture | Future for the  | 
| WriteFuture | Future for the  | 
| WriteHalf | The write half returned by  | 
| WriteVectoredFuture | Future for the  | 
Traits
| AsyncBufReadExt | Extension trait for  | 
| AsyncReadExt | Extension trait for  | 
| AsyncSeekExt | Extension trait for  | 
| AsyncWriteExt | Extension trait for  | 
Functions
| copy | Copies the entire contents of a reader into a writer. | 
| empty | Creates an empty reader. | 
| repeat | Creates an infinite reader that reads the same byte repeatedly. | 
| sink | Creates a writer that consumes and drops all data. | 
| split | Splits a stream into  | 
Type Definitions
| BoxedReader | Type alias for  | 
| BoxedWriter | Type alias for  |