[src]

Function std::io::stdio::stdin

pub fn stdin() -> BufferedReader<StdReader>

Creates a new non-blocking handle to the stdin of the current process.

The returned handled is buffered by default with a BufferedReader. If buffered access is not desired, the stdin_raw function is provided to provided unbuffered access to stdin.

Care should be taken when creating multiple handles to the stdin of a process. Beause this is a buffered reader by default, it's possible for pending input to be unconsumed in one reader and unavailable to other readers. It is recommended that only one handle at a time is created for the stdin of a process.

See stdout() for more notes about this function.