term-table-rs
The purpose of term-table-rs is to make displaying table data in CLI apps easier

Here is an example of how to create a table
let mut table = new;
table.max_column_width = 40;
table.style = extended;
table.add_row;
table.add_row;
table.add_row;
table.add_row;
println!;
Here's the result

Table Styles
It is possible to define your own table styles by creating a new instance of TableStyle
This is what the extend table style implementation looks like. This is the defualy style in term-table-rs
TableStyle also implements a simple() table style function and a blank() table style function
Those styles looks like this
Blank

Simple

Column Widths
It is possible to control the maximum width of table columns. The max_column_width property of Table can be set to restrict the width of all TableCells. The set_max_column_width function of Table can be used to set the max width of a specific column. The set_max_column_widths function provides the ability to set the width of multiple columns by passing in a Vec of tuples containing an index and width.
Disabling Row Separators
There are a few different options for disabling row seperation.
Table has three flags for controlling row seperation:
-
separate_rowsdictates whether rows are seperated within the table
-
has_top_boarderdictates whether or not the table has a top border
-
has_bottom_boarderdicates whether or not the table has a bottom border
Separators can also be contolled per row by setting the has_separator flag on Row
