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
#[allow(dead_code)]
pub enum SpecChars {
    Dash,
    Dot,
    Slash,
    UnderScore,
    WhiteSpace,
}


impl SpecChars {
    pub fn value(&self) -> char {
        match self {
            SpecChars::Dash => '-',
            SpecChars::Dot => '.',
            SpecChars::Slash => '/',
            SpecChars::UnderScore => '_',
            SpecChars::WhiteSpace => ' '
        }
    }

    pub fn to_string(&self) -> String {
        return self.value().to_string();
    }
}