ratatui_core/symbols/
block.rs

1pub const FULL: &str = "█";
2pub const SEVEN_EIGHTHS: &str = "▉";
3pub const THREE_QUARTERS: &str = "▊";
4pub const FIVE_EIGHTHS: &str = "▋";
5pub const HALF: &str = "▌";
6pub const THREE_EIGHTHS: &str = "▍";
7pub const ONE_QUARTER: &str = "▎";
8pub const ONE_EIGHTH: &str = "▏";
9
10#[derive(Debug, Clone, Eq, PartialEq, Hash)]
11pub struct Set<'a> {
12    pub full: &'a str,
13    pub seven_eighths: &'a str,
14    pub three_quarters: &'a str,
15    pub five_eighths: &'a str,
16    pub half: &'a str,
17    pub three_eighths: &'a str,
18    pub one_quarter: &'a str,
19    pub one_eighth: &'a str,
20    pub empty: &'a str,
21}
22
23impl Default for Set<'_> {
24    fn default() -> Self {
25        NINE_LEVELS
26    }
27}
28
29pub const THREE_LEVELS: Set = Set {
30    full: FULL,
31    seven_eighths: FULL,
32    three_quarters: HALF,
33    five_eighths: HALF,
34    half: HALF,
35    three_eighths: HALF,
36    one_quarter: HALF,
37    one_eighth: " ",
38    empty: " ",
39};
40
41pub const NINE_LEVELS: Set = Set {
42    full: FULL,
43    seven_eighths: SEVEN_EIGHTHS,
44    three_quarters: THREE_QUARTERS,
45    five_eighths: FIVE_EIGHTHS,
46    half: HALF,
47    three_eighths: THREE_EIGHTHS,
48    one_quarter: ONE_QUARTER,
49    one_eighth: ONE_EIGHTH,
50    empty: " ",
51};