1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
use std::fmt;

/// # Colors
/// Bootstrap colors for buttons, links, etc.
#[derive(Clone, PartialEq, Eq)]
pub enum Color {
    Primary,
    Secondary,
    Success,
    Info,
    Warning,
    Danger,
    Light,
    Dark,
    Link,
}

impl fmt::Display for Color {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            Color::Primary => write!(f, "primary"),
            Color::Secondary => write!(f, "secondary"),
            Color::Success => write!(f, "success"),
            Color::Info => write!(f, "info"),
            Color::Warning => write!(f, "warning"),
            Color::Danger => write!(f, "danger"),
            Color::Light => write!(f, "light"),
            Color::Dark => write!(f, "dark"),
            Color::Link => write!(f, "link"),
        }
    }
}