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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//! A module for miscellaneous enums

// Enables use as an iterable and computation of length
use strum_macros::{EnumIter, EnumCount};

/// Programming languages better than Rust
#[derive(Debug, EnumIter, EnumCount, Copy, Clone)]
pub enum BetterThanRust {
    /// That's right, there aren't any.
    None = 0
}

#[cfg(test)]
mod better_than_rust {
    use crate::BetterThanRust as ENUM_TO_TEST;

    #[test]
    fn accessibility() {
        println!("How many programming languages are better than rust {:?}", ENUM_TO_TEST::None);
    }

    #[test]
    fn int_casting() {
        println!("How many programming languages are better than rust? {:?}", ENUM_TO_TEST::None as i32);
    }
}

/// Standard medals
#[derive(Debug, EnumIter, EnumCount, Copy, Clone)]
pub enum Medal {
    /// A [Gold Medal](https://en.wikipedia.org/wiki/Gold_medal) is typical awarded for first place
    Gold = 1,

    /// A [Silver Medal](https://en.wikipedia.org/wiki/Silver_medal) is typical awarded for second place
    Silver = 2,

    /// A [Bronze Medal](https://en.wikipedia.org/wiki/Silver_medal) is typical awarded for third place
    Bronze = 3,
}

/// An ordinal list for 1-100
#[allow(missing_docs)]
#[derive(Debug, EnumIter, EnumCount, Copy, Clone)]
pub enum Ordinal {
    First = 1,
    Second = 2,
    Third = 3,
    Fourth = 4,
    Fifth = 5,
    Sixth = 6,
    Seventh = 7,
    Eighth = 8,
    Ninth = 9,
    Tenth = 10,
    Eleventh = 11,
    Twelfth = 12,
    Thirteenth = 13,
    Fourteenth = 14,
    Fifteenth = 15,
    Sixteenth = 16,
    Seventeenth = 17,
    Eighteenth = 18,
    Nineteenth = 19,
    Twentieth = 20,
    Twentyfirst = 21,
    Twentysecond = 22,
    Twentythird = 23,
    Twentyfourth = 24,
    Twentyfifth = 25,
    Twentysixth = 26,
    Twentyseventh = 27,
    Twentyeighth = 28,
    Twentyninth = 29,
    Thirtieth = 30
}