tabled/tables/
mod.rs

1//! Module contains a list of table representatives.
2//!
3//! ## [`Table`]
4//!
5//! A default table implementation.
6//!
7//! At it's core it keeps data buffered.
8//! Be cautious about it.
9//!
10//! Peek it by default.
11//!
12//! ## [`IterTable`]
13//!
14//! Just like [`Table`] but it's API is a bit different to serve better in context
15//! where there is a memory limit.
16//!
17//! It's different in implementation algorithms.
18//!
19//! From performance point of view it's similar to [`Table`], may be a bit slower.
20//! Test it on your specific table representation.
21//!
22//! Peek it when you want to have a feature full table.
23//! But you have a memory conserns.
24//!
25//! ## [`PoolTable`]
26//!
27//! A table with a greater control of a layout.
28//! So you can build tables with a different layout/look easily.
29//!
30//! Peek it when you need it.
31//!
32//! ## [`CompactTable`]
33//!
34//! A table with a limited subset of settings but it works in a `no-std` context.
35//! And it consumes the least amount of memory/cpu.
36//! Cause it print records one by one.
37//!
38//! Peek it when your data contains a single line only,
39//! and you don't need lots a features.
40//! Or you're at `no-std` context.
41//!
42//! It's likely the fastest table in this limited context.
43//!
44//! ## [`ExtendedTable`]
45//!
46//! It's a table which is useful for showing large amount of data.
47//! Though it's performance is generic.
48//!
49//! Peek it when you need it.
50
51mod compact;
52
53#[cfg(feature = "std")]
54mod extended;
55#[cfg(feature = "std")]
56mod iter;
57#[cfg(feature = "std")]
58mod table;
59#[cfg(feature = "std")]
60mod table_pool;
61
62#[cfg(feature = "std")]
63#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
64pub use table::Table;
65
66#[cfg(feature = "std")]
67#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
68pub use iter::IterTable;
69
70#[cfg(feature = "std")]
71#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
72pub use extended::ExtendedTable;
73
74#[cfg(feature = "std")]
75#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
76pub use table_pool::{PoolTable, TableValue};
77
78pub use compact::CompactTable;
79
80// todo: Create a PoolTable backend in papergrid with generics so it coulb be used differently
81//       rather then with our own impl of dimension
82//
83// todo: Replace all usage of concrete configs to a AsRef<Config> generics, so some could be used interchangeably
84//
85// todo: Think about all the Config hierachly; we probably shall have something like a Decorator approach there.
86//       config(borders) -> config(borders+colors) -> config(borders+colors+spans)
87//
88//       Or maybe many interfacies e.g ColorConfig, BorderConfig, AlignmentConfig etc.