Module stdio

Source

MacrosΒ§

impl_is_terminal πŸ”’

StructsΒ§

Stderr
A handle to the standard error stream of a process.
StderrLock
A locked reference to the Stderr handle.
StderrRaw πŸ”’
A handle to a raw instance of the standard output stream of this process.
Stdin
A handle to the standard input stream of a process.
StdinLock
A locked reference to the Stdin handle.
StdinRaw πŸ”’
A handle to a raw instance of the standard input stream of this process.
Stdout
A handle to the global standard output stream of the current process.
StdoutLock
A locked reference to the Stdout handle.
StdoutRaw πŸ”’
A handle to a raw instance of the standard output stream of this process.

ConstantsΒ§

OUTPUT_CAPTURE πŸ”’
Used by the test crate to capture the output of the print macros and panics.

StaticsΒ§

OUTPUT_CAPTURE_USED πŸ”’
Flag to indicate OUTPUT_CAPTURE is used.
STDOUT πŸ”’

TraitsΒ§

IsTerminal
Trait to determine if a descriptor/handle refers to a terminal/tty.

FunctionsΒ§

attempt_print_to_stderr πŸ”’
Used by impl Termination for Result to print error after main or a test has returned. Should avoid panicking, although we can’t help it if one of the Display impls inside args decides to.
cleanup
handle_ebadf πŸ”’
print_to πŸ”’
Writes args to the capture buffer if enabled and possible, or global_s otherwise. label identifies the stream in a panic message.
print_to_buffer_if_capture_used πŸ”’
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.
_eprint πŸ‘» Experimental
_print πŸ‘» Experimental
set_output_capture πŸ‘» Experimental
Sets the thread-local output capture buffer and returns the old one.
stderr_raw πŸ”’ Experimental
Constructs a new raw handle to the standard error stream of this process.
stdin_raw πŸ”’ Experimental
Constructs a new raw handle to the standard input of this process.
stdout_raw πŸ”’ Experimental
Constructs a new raw handle to the standard output stream of this process.
try_set_output_capture πŸ‘» Experimental
Tries to set the thread-local output capture buffer and returns the old one. This may fail once thread-local destructors are called. It’s used in panic handling instead of set_output_capture.

Type AliasesΒ§

LocalStream πŸ”’