Stdin in async_std::io - Rust (original) (raw)

pub struct Stdin(/* private fields */);

Expand description

A handle to the standard input of the current process.

This reader is created by the stdin function. See its documentation for more.

§Note: Windows Portability Consideration

When operating in a console, the Windows implementation of this stream does not support non-UTF-8 byte sequences. Attempting to read bytes that are not valid UTF-8 will return an error.

Source§

Source

Reads a line of input into the specified buffer.

§Examples
use async_std::io;

let stdin = io::stdin();
let mut line = String::new();
stdin.read_line(&mut line).await?;

§

§

§

§

§

§