throbber_widgets_tui/
symbols.rs

1pub mod throbber {
2    /// A set of symbols to be rendered by throbber.
3    #[derive(Debug, Clone, PartialEq, Eq)]
4    pub struct Set {
5        pub full: &'static str,
6        pub empty: &'static str,
7        pub symbols: &'static [&'static str],
8    }
9
10    /// Rendering object.
11    ///
12    /// If Spin is specified, ThrobberState.index is used.
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    pub enum WhichUse {
15        Full,
16        Empty,
17        Spin,
18    }
19
20    /// ["|", "/", "-", "\\"]
21    pub const ASCII: Set = Set {
22        full: "*",
23        empty: " ",
24        symbols: &["|", "/", "-", "\\"],
25    };
26
27    /// ["│", "╱", "─", "╲"]
28    pub const BOX_DRAWING: Set = Set {
29        full: "┼",
30        empty: " ",
31        symbols: &["│", "╱", "─", "╲"],
32    };
33
34    /// ["↑", "↗", "→", "↘", "↓", "↙", "←", "↖"]
35    pub const ARROW: Set = Set {
36        full: "↔",
37        empty: " ",
38        symbols: &["↑", "↗", "→", "↘", "↓", "↙", "←", "↖"],
39    };
40
41    /// ["⇑", "⇗", "⇒", "⇘", "⇓", "⇙", "⇐", "⇖"]
42    pub const DOUBLE_ARROW: Set = Set {
43        full: "⇔",
44        empty: " ",
45        symbols: &["⇑", "⇗", "⇒", "⇘", "⇓", "⇙", "⇐", "⇖"],
46    };
47
48    /// ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"]
49    pub const VERTICAL_BLOCK: Set = Set {
50        full: "█",
51        empty: " ",
52        symbols: &["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"],
53    };
54
55    /// ["▏", "▎", "▍", "▌", "▋", "▊", "▉", "█"]
56    pub const HORIZONTAL_BLOCK: Set = Set {
57        full: "█",
58        empty: " ",
59        symbols: &["▏", "▎", "▍", "▌", "▋", "▊", "▉", "█"],
60    };
61
62    /// ["▝", "▗", "▖", "▘"]
63    pub const QUADRANT_BLOCK: Set = Set {
64        full: "█",
65        empty: " ",
66        symbols: &["▝", "▗", "▖", "▘"],
67    };
68
69    /// ["▙", "▛", "▜", "▟"]
70    pub const QUADRANT_BLOCK_CRACK: Set = Set {
71        full: "█",
72        empty: " ",
73        symbols: &["▙", "▛", "▜", "▟"],
74    };
75
76    /// ["◳", "◲", "◱", "◰"]
77    pub const WHITE_SQUARE: Set = Set {
78        full: "⊞",
79        empty: " ",
80        symbols: &["◳", "◲", "◱", "◰"],
81    };
82
83    /// ["◷", "◶", "◵", "◴"]
84    pub const WHITE_CIRCLE: Set = Set {
85        full: "⊕",
86        empty: " ",
87        symbols: &["◷", "◶", "◵", "◴"],
88    };
89
90    /// ["◑", "◒", "◐", "◓"]
91    pub const BLACK_CIRCLE: Set = Set {
92        full: "●",
93        empty: " ",
94        symbols: &["◑", "◒", "◐", "◓"],
95    };
96
97    /// ["🕛", "🕧", "🕐", "🕜", "🕑", ..., "🕚", "🕦"]
98    pub const CLOCK: Set = Set {
99        full: "🕛",
100        empty: " ",
101        symbols: &[
102            "🕛", "🕧", "🕐", "🕜", "🕑", "🕝", "🕒", "🕞", "🕓", "🕟", "🕔", "🕠", "🕕", "🕡",
103            "🕖", "🕢", "🕗", "🕣", "🕘", "🕤", "🕙", "🕥", "🕚", "🕦",
104        ],
105    };
106
107    /// ["⠈", "⠐", "⠠", "⠄", "⠂", "⠁"]
108    pub const BRAILLE_ONE: Set = Set {
109        full: "⠿",
110        empty: " ",
111        symbols: &["⠈", "⠐", "⠠", "⠄", "⠂", "⠁"],
112    };
113
114    /// ["⠘", "⠰", "⠤", "⠆", "⠃", "⠉"]
115    pub const BRAILLE_DOUBLE: Set = Set {
116        full: "⠿",
117        empty: " ",
118        symbols: &["⠘", "⠰", "⠤", "⠆", "⠃", "⠉"],
119    };
120
121    /// ["⠷", "⠯", "⠟", "⠻", "⠽", "⠾"]
122    pub const BRAILLE_SIX: Set = Set {
123        full: "⠿",
124        empty: " ",
125        symbols: &["⠷", "⠯", "⠟", "⠻", "⠽", "⠾"],
126    };
127
128    /// ["⠧", "⠏", "⠛", "⠹", "⠼", "⠶"]
129    pub const BRAILLE_SIX_DOUBLE: Set = Set {
130        full: "⠿",
131        empty: " ",
132        symbols: &["⠧", "⠏", "⠛", "⠹", "⠼", "⠶"],
133    };
134
135    /// ["⣷", "⣯", "⣟", "⡿", "⢿", "⣻", "⣽", "⣾"]
136    pub const BRAILLE_EIGHT: Set = Set {
137        full: "⣿",
138        empty: " ",
139        symbols: &["⣷", "⣯", "⣟", "⡿", "⢿", "⣻", "⣽", "⣾"],
140    };
141
142    /// ["⣧", "⣏", "⡟", "⠿", "⢻", "⣹", "⣼", "⣶"]
143    pub const BRAILLE_EIGHT_DOUBLE: Set = Set {
144        full: "⣿",
145        empty: " ",
146        symbols: &["⣧", "⣏", "⡟", "⠿", "⢻", "⣹", "⣼", "⣶"],
147    };
148
149    /// [" ", "ᚐ", "ᚑ", "ᚒ", "ᚓ", "ᚔ"]
150    pub const OGHAM_A: Set = Set {
151        full: "ᚔ",
152        empty: " ",
153        symbols: &[" ", "ᚐ", "ᚑ", "ᚒ", "ᚓ", "ᚔ"],
154    };
155
156    /// [" ", "ᚁ", "ᚂ", "ᚃ", "ᚄ", "ᚅ"]
157    pub const OGHAM_B: Set = Set {
158        full: "ᚅ",
159        empty: " ",
160        symbols: &[" ", "ᚁ", "ᚂ", "ᚃ", "ᚄ", "ᚅ"],
161    };
162
163    /// [" ", "ᚆ", "ᚇ", "ᚈ", "ᚉ", "ᚊ"]
164    pub const OGHAM_C: Set = Set {
165        full: "ᚊ",
166        empty: " ",
167        symbols: &[" ", "ᚆ", "ᚇ", "ᚈ", "ᚉ", "ᚊ"],
168    };
169
170    /// ["⎛", "⎜", "⎝", "⎞", "⎟", "⎠"]
171    pub const PARENTHESIS: Set = Set {
172        full: "∫",
173        empty: " ",
174        symbols: &["⎛", "⎜", "⎝", "⎞", "⎟", "⎠"],
175    };
176
177    /// ["ᔐ", "ᯇ", "ᔑ", "ᯇ"]
178    pub const CANADIAN: Set = Set {
179        full: "ᦟ",
180        empty: " ",
181        symbols: &["ᔐ", "ᯇ", "ᔑ", "ᯇ"],
182    };
183}