Skip to main content

Module display

Module display 

Source
Expand description

Display utilities: column alignment, truncation, and builder traits.

Provides consistent text formatting for terminal output across the Batuta stack.

Enums§

ColumnAlign
Column alignment for formatted output.
TruncateStrategy
Truncation strategy for text that exceeds column width.

Traits§

WithDimensions
Trait for types that have configurable width/height dimensions.

Functions§

format_bytes_column
Format bytes into a fixed-width column (SI units, right-aligned).
format_column
Format text into a fixed-width column with alignment and truncation.
format_number_column
Format a number into a fixed-width column (right-aligned, with commas).
format_percent_column
Format a percentage into a fixed-width column (right-aligned).
truncate
Truncate a string to fit within a maximum width.
truncate_path
Smart path truncation that preserves the filename.
truncate_str
Truncate a string to max_len with ASCII "..." suffix.