Expand description
Table rendering primitives and formatting logic.
The crate root re-exports the main types from this module, so most users
will interact with Table, Column, Cell, Trunc, and
Align.
The renderer works in three steps:
- Measure content width for headers and rows.
- Apply column width rules, truncation, and wrapping.
- Emit a bordered table using the active terminal width when available.
The public API is intentionally small. Table owns the rows, Column
defines the schema, and Cell gives you per-value overrides when needed.
Re-exports§
pub use crate::color::Color;pub use crate::color::CustomColor;
Structs§
- Cell
- A single table cell with optional styling overrides.
- Column
- A column definition that bundles the header text with default styling.
- Column
Builder - Builder returned by
Table::columnfor per-column styling. - Section
Builder - Builder returned by
Table::add_sectionandTable::add_separator. - Section
Style - Characters used to overwrite section and separator styles.
- Table
- Main table type for terminal output.
- Table
Style - Characters used to draw table borders and joints.
Enums§
- Align
- Alignment options for any content supporting alignment.
- Column
Target - Selector used to apply styling to a column.
- Column
Width - Width policy for a table column.
- Trunc
- How to handle content that does not fit inside the available column width.