Skip to main content

Module console_theme

Module console_theme 

Source
Expand description

Console theming for error display in CLI applications.

This module provides ANSI color formatting for error messages displayed in terminal environments. It auto-detects terminal capabilities via std::io::IsTerminal and disables colors when stderr is not a TTY, when TERM=dumb, or when NO_COLOR is set (https://no-color.org/).

Structs§

ConsoleTheme
Color theme for console error output.

Functions§

install_panic_hook
Install a panic hook that formats panics using the ConsoleTheme
print_error
Pretty-print an error to stderr with the default theme.