Module std::old_io::stdioUnstable [-] [+] [src]

Non-blocking access to stdin, stdout, and stderr.

This module provides bindings to the local event loop's TTY interface, using it to offer synchronous but non-blocking versions of stdio. These handles can be inspected for information about terminal dimensions or for related information about the stream or terminal to which it is attached.

Example

fn main() { #![allow(unused_must_use)] use std::old_io; let mut out = old_io::stdout(); out.write_all(b"Hello, world!"); }
use std::old_io;

let mut out = old_io::stdout();
out.write_all(b"Hello, world!");

Structs

StdReader

Representation of a reader of a standard input stream

StdWriter

Representation of a writer to a standard output stream

StdinReader

A synchronized wrapper around a buffered reader from stdin

StdinReaderGuard

A guard for exclusive access to StdinReader's internal BufferedReader.

Functions

flush

Flushes the local task's stdout handle.

print

Prints a string to the stdout of the current process. No newline is emitted after the string is printed.

print_args

Similar to print, but takes a fmt::Arguments structure to be compatible with the format_args! macro.

println

Prints a string to the stdout of the current process. A literal \n character is printed to the console after the string.

println_args

Similar to println, but takes a fmt::Arguments structure to be compatible with the format_args! macro.

set_stderr

Resets the task-local stderr handle to the specified writer

set_stdout

Resets the task-local stdout handle to the specified writer

stderr

Creates a line-buffered handle to the stderr of the current process.

stderr_raw

Creates an unbuffered handle to the stderr of the current process

stdin

Creates a new handle to the stdin of the current process.

stdin_raw

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

stdout

Creates a line-buffered handle to the stdout of the current process.

stdout_raw

Creates an unbuffered handle to the stdout of the current process