1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/// Left, Center, Right or Unspecified
#[derive(Default, Debug, PartialEq, Eq, Clone, Copy)]
pub enum Alignment {
    #[default]
    Unspecified,
    Left,
    Center,
    Right,
}

impl Alignment {
    pub fn col_spec(self) -> &'static str {
        match self {
            Self::Left => "|:-",
            Self::Right => "|-:",
            Self::Center => "|:-:",
            Self::Unspecified => "|-",
        }
    }
}