matchmaker/utils/seperator.rs
1#[derive(Clone, Copy, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
2pub enum HorizontalSeparator {
3 #[default]
4 None,
5 Empty,
6 Light,
7 Normal,
8 Heavy,
9 Dashed,
10}
11
12impl HorizontalSeparator {
13 pub fn as_str(self) -> &'static str {
14 match self {
15 Self::None => unreachable!(),
16 Self::Empty => " ",
17 Self::Light => "─", // U+2500
18 Self::Normal => "─",
19 Self::Heavy => "━", // U+2501
20 Self::Dashed => "╌", // U+254C (box drawings light double dash)
21 }
22 }
23}