Module shell

Source
Expand description

Utility functions for writing to stdout and stderr.

Simplified adaptation from https://github.com/foundry-rs/foundry/blob/master/crates/common/src/io/macros.rs.

Structs§

Shell
A shell abstraction that tracks verbosity level, an output mode, and a color choice. It uses anstream’s AutoStream for stdout and stderr.

Enums§

ColorChoice
Choices for whether to use colored output.
OutputMode
The output mode: either normal output or completely quiet.

Constants§

ERROR
Default styles for WARNING and ERROR messages.
WARN

Functions§

get_shell
Get a lock to the global shell.
set_shell
(Optional) Set the global shell with a custom configuration.