[−][src]Module smol::io
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
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 |
Error | The error type for I/O operations of 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 |
Enums
ErrorKind | A list specifying general categories of I/O error. |
SeekFrom | Enumeration of possible methods to seek within an I/O object. |
Traits
AsyncBufRead | Read bytes asynchronously. |
AsyncBufReadExt | Extension trait for |
AsyncRead | Read bytes asynchronously. |
AsyncReadExt | Extension trait for |
AsyncSeek | Seek bytes asynchronously. |
AsyncSeekExt | Extension trait for |
AsyncWrite | Write bytes asynchronously. |
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 |
Result | A specialized |