[−][src]Module async_std::io
Basic input and output.
This module is an async version of std::io
.
Examples
Read a line from the standard input:
use async_std::io; let stdin = io::stdin(); let mut line = String::new(); stdin.read_line(&mut line).await?;
Modules
prelude | The async I/O Prelude |
Structs
BufReader | Adds buffering to any reader. |
Empty | A reader that contains no data. |
Error | The error type for I/O operations of the |
Lines | A stream of lines in a byte stream. |
Sink | A writer that consumes and drops all data. |
Stderr | A handle to the standard error of the current process. |
Stdin | A handle to the standard input of the current process. |
Stdout | A handle to the standard output of the current process. |
Enums
ErrorKind | A list specifying general categories of I/O error. |
SeekFrom | Enumeration of possible methods to seek within an I/O object. |
Traits
BufRead | Allows reading from a buffered byte stream. |
Read | Allows reading from a byte stream. |
Seek | Allows seeking through a byte stream. |
Write | Allows writing to a byte stream. |
Functions
copy | Copies the entire contents of a reader into a writer. |
empty | Creates a reader that contains no data. |
sink | Creates a writer that consumes and drops all data. |
stderr | Constructs a new handle to the standard error of the current process. |
stdin | Constructs a new handle to the standard input of the current process. |
stdout | Constructs a new handle to the standard output of the current process. |
timeout | Awaits an I/O future or times out after a duration of time. |
Type Definitions
Result | A specialized |