comfy_table/style/presets.rs
1/// The default style for tables.
2///
3/// ```text
4/// +-------+-------+
5/// | Hello | there |
6/// +===============+
7/// | a | b |
8/// |-------+-------|
9/// | c | d |
10/// +-------+-------+
11/// ```
12pub const ASCII_FULL: &str = "||--+==+|-+||++++++";
13
14/// Just like ASCII_FULL, but without dividers between rows.
15///
16/// ```text
17/// +-------+-------+
18/// | Hello | there |
19/// +===============+
20/// | a | b |
21/// | c | d |
22/// +-------+-------+
23pub const ASCII_FULL_CONDENSED: &str = "||--+==+| ++++++";
24
25/// Just like ASCII_FULL, but without any borders.
26///
27/// ```text
28/// Hello | there
29/// ===============
30/// a | b
31/// -------+-------
32/// c | d
33/// ```
34pub const ASCII_NO_BORDERS: &str = " == |-+ ";
35
36/// Just like ASCII_FULL, but without vertical/horizontal middle lines.
37///
38/// ```text
39/// +---------------+
40/// | Hello there |
41/// +===============+
42/// | a b |
43/// | |
44/// | c d |
45/// +---------------+
46/// ```
47pub const ASCII_BORDERS_ONLY: &str = "||--+==+ ||--++++";
48
49/// Just like ASCII_BORDERS_ONLY, but without spacing between rows.
50///
51/// ```text
52/// +---------------+
53/// | Hello there |
54/// +===============+
55/// | a b |
56/// | c d |
57/// +---------------+
58/// ```
59pub const ASCII_BORDERS_ONLY_CONDENSED: &str = "||--+==+ --++++";
60
61/// Just like ASCII_FULL, but without vertical/horizontal middle lines and no side borders.
62///
63/// ```text
64/// ---------------
65/// Hello there
66/// ===============
67/// a b
68/// ---------------
69/// c d
70/// ---------------
71/// ```
72pub const ASCII_HORIZONTAL_ONLY: &str = " -- == -- -- ";
73
74/// Markdown like table styles.
75///
76/// ```text
77/// | Hello | there |
78/// |-------|-------|
79/// | a | b |
80/// | c | d |
81/// ```
82pub const ASCII_MARKDOWN: &str = "|| |-||| ";
83
84/// The UTF8 enabled version of the default style for tables.\
85/// Quite beautiful isn't it? It's drawn with UTF8's box drawing characters.
86///
87/// ```text
88/// ┌───────┬───────┐
89/// │ Hello ┆ there │
90/// ╞═══════╪═══════╡
91/// │ a ┆ b │
92/// ├╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┤
93/// │ c ┆ d │
94/// └───────┴───────┘
95/// ```
96pub const UTF8_FULL: &str = "││──╞═╪╡┆╌┼├┤┬┴┌┐└┘";
97
98/// Default UTF8 style, but without dividers between rows.
99///
100/// ```text
101/// ┌───────┬───────┐
102/// │ Hello ┆ there │
103/// ╞═══════╪═══════╡
104/// │ a ┆ b │
105/// │ c ┆ d │
106/// └───────┴───────┘
107/// ```
108pub const UTF8_FULL_CONDENSED: &str = "││──╞═╪╡┆ ┬┴┌┐└┘";
109
110/// Default UTF8 style, but without any borders.
111///
112/// ```text
113/// Hello ┆ there
114/// ═══════╪═══════
115/// a ┆ b
116/// ╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌
117/// c ┆ d
118/// ```
119pub const UTF8_NO_BORDERS: &str = " ═╪ ┆╌┼ ";
120
121/// Just like the UTF8_FULL style, but without vertical/horizontal middle lines.
122///
123/// ```text
124/// ┌───────────────┐
125/// │ Hello there │
126/// ╞═══════════════╡
127/// │ a b │
128/// │ c d │
129/// └───────────────┘
130/// ```
131pub const UTF8_BORDERS_ONLY: &str = "││──╞══╡ ──┌┐└┘";
132
133/// Only display vertical lines.
134///
135/// ```text
136/// ───────────────
137/// Hello there
138/// ═══════════════
139/// a b
140/// ───────────────
141/// c d
142/// ───────────────
143/// ```
144pub const UTF8_HORIZONTAL_ONLY: &str = " ── ══ ── ── ";
145
146/// Don't draw any borders or other lines.
147/// Useful, if you want to simply organize some data without any cosmetics.
148///
149/// ```text
150/// Hello there
151/// a b
152/// c d
153/// ```
154pub const NOTHING: &str = " ";