pushover/types/
sound.rs

1use std::fmt;
2
3#[derive(Clone, Debug, PartialEq, PartialOrd)]
4pub enum Sound {
5    Pushover,
6    Bike,
7    Bugle,
8    CashRegister,
9    Classical,
10    Cosmic,
11    Falling,
12    Gamelan,
13    Incoming,
14    Intermission,
15    Magic,
16    Mechanical,
17    PianoBar,
18    Siren,
19    SpaceAlarm,
20    TugBoat,
21    Alien,
22    Climb,
23    Persistent,
24    Echo,
25    UpDown,
26    None,
27}
28
29impl fmt::Display for Sound {
30    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
31        let printable = match *self {
32            Sound::Pushover => "pushover",
33            Sound::Bike => "bike",
34            Sound::Bugle => "bugle",
35            Sound::CashRegister => "cashregister",
36            Sound::Classical => "classical",
37            Sound::Cosmic => "cosmic",
38            Sound::Falling => "falling",
39            Sound::Gamelan => "gamelan",
40            Sound::Incoming => "incoming",
41            Sound::Intermission => "intermission",
42            Sound::Magic => "magic",
43            Sound::Mechanical => "mechanical",
44            Sound::PianoBar => "pianobar",
45            Sound::Siren => "siren",
46            Sound::SpaceAlarm => "spacealarm",
47            Sound::TugBoat => "tugboat",
48            Sound::Alien => "alien",
49            Sound::Climb => "climb",
50            Sound::Persistent => "persistent",
51            Sound::Echo => "echo",
52            Sound::UpDown => "updown",
53            Sound::None => "none",
54        };
55
56        write!(f, "{}", printable)
57    }
58}