Crates.io | kitty_table |
lib.rs | kitty_table |
version | 1.1.0 |
source | src |
created_at | 2024-09-13 06:01:09.675085 |
updated_at | 2024-09-14 21:44:38.48707 |
description | Very small and barebones library for printing tables of data. |
homepage | |
repository | https://codeberg.org/AshliKatt/kitty_table |
max_upload_size | |
id | 1373387 |
size | 34,973 |
This tiny library adds methods for printing organized tables of information for debugging.
To begin printing tables, a TableFormatter
should be created either using new
or
from_style
. The former will create a new formatter from scratch, allowing
you to supply an array of [Column]s which dictate how the table will be printed. The latter will automatically
fill in the table's style information if your data implements DefaultTableStyle
.
To actually print results using a created TableFormatter
, write
,
debug_write
, print
, and
debug_print
may be used. They require a collection of
data that implements either DisplayTableRow
or DebugTableRow
to work.
DebugTableRow
and DefaultTableStyle
may be derive
d— see their documentation
for more information about requirements, and about types they are automatically
implemented on.
The examples
folder shows off a few practical, annotated examples of tables being created. It may
be beneficial to check them out!