Expand description
§Terminal Display Helpers
Styled output utilities for rich, user-friendly terminal presentation.
Text is painted by semantic role through super::theme, with
unicode box-drawing characters for structure.
All helpers respect non-TTY contexts (piped output) by falling back to plain text.
Long text is automatically word-wrapped to the detected terminal width.
Re-exports§
pub use super::theme::color_enabled;pub use super::theme::color_enabled_stderr;pub use super::theme::color_enabled_with;pub use super::theme::set_color_override;
Structs§
- Col
- Column specification for table formatting.
Functions§
- blank_
row - Empty line with continuation bar.
- bullet_
row - A bullet-point row inside a section.
- chart_
row - A line of a chart inside a section, after the bar: the line is drawn and painted already, so it is neither wrapped nor painted again.
- check_
fail - Health check fail line.
- check_
na - Formats a check that does not apply (dim dash, message in grey).
- check_
pass - Health check pass line.
- check_
warn - A check row for a warning: outside its target, but not a failure.
- detail_
row - An indented detail line inside a section (for sub-items like vulnerability descriptions).
- format_
price_ peg - Format a price with color for peg deviation. The bands come from the health thresholds: green on the peg, yellow inside the outlier band, red outside it.
- info_
row - An informational note row inside a section box.
- kv_row
- A key-value row inside a section, with aligned values.
- kv_
row_ delta - A key-value row where the value is colored based on positive/negative.
- labelled_
warn - A warning with a name in a column of
label_colsand its detail after it, wrapped under the detail: one signal of a list. - link_
row - A link row inside a section box.
- numbered_
row - Format an enumerated list item inside a section box.
- orderbook_
level - An order book level row with price coloring relative to peg.
- painter
- The painter the row helpers use: color when stdout takes it.
- score_
bar - A visual score bar with color coding.
- section_
footer - Section footer (closing box line).
- section_
header - Section header with colored title and box-drawing underline.
- separator
- A separator row inside a section.
- set_
width_ override - Sets the width that
terminal_widthreturns for the whole process, or removes the override (None).Some(0)also removes it. The TUI removes it each time it gives the terminal back. - severity_
label - Severity label with color coding.
- status_
line - Overall status line (healthy / unhealthy).
- subsection_
header - Sub-section header (lighter weight).
- table_
header - Format a table header row inside a section box.
- table_
row - Format a table data row inside a section box.
- terminal_
width - Returns the current terminal width in columns.
- warning_
row - A warning banner inside a section box.
- width_
override - The width override, if one is set.
- wrap_
lines - Word-wrap
textso each line fits withincontent_widthcolumns.