Skip to main content

steam_enums/
estoreapptype.rs

1#![allow(non_camel_case_types)]
2#![allow(non_upper_case_globals)]
3#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
4#[repr(i32)]
5pub enum EStoreAppType {
6    Game = 0,
7    Demo = 1,
8    Mod = 2,
9    Movie = 3,
10    DLC = 4,
11    Guide = 5,
12    Software = 6,
13    Video = 7,
14    Series = 8,
15    Episode = 9,
16    Hardware = 10,
17    Music = 11,
18    Beta = 12,
19    Tool = 13,
20    Advertising = 14,
21}
22
23impl EStoreAppType {
24    pub fn from_i32(val: i32) -> Option<Self> {
25        match val {
26            x if x == Self::Game as i32 => Some(Self::Game),
27            x if x == Self::Demo as i32 => Some(Self::Demo),
28            x if x == Self::Mod as i32 => Some(Self::Mod),
29            x if x == Self::Movie as i32 => Some(Self::Movie),
30            x if x == Self::DLC as i32 => Some(Self::DLC),
31            x if x == Self::Guide as i32 => Some(Self::Guide),
32            x if x == Self::Software as i32 => Some(Self::Software),
33            x if x == Self::Video as i32 => Some(Self::Video),
34            x if x == Self::Series as i32 => Some(Self::Series),
35            x if x == Self::Episode as i32 => Some(Self::Episode),
36            x if x == Self::Hardware as i32 => Some(Self::Hardware),
37            x if x == Self::Music as i32 => Some(Self::Music),
38            x if x == Self::Beta as i32 => Some(Self::Beta),
39            x if x == Self::Tool as i32 => Some(Self::Tool),
40            x if x == Self::Advertising as i32 => Some(Self::Advertising),
41            _ => None,
42        }
43    }
44}