steam_enums/
eplatformtype.rs1#![allow(non_camel_case_types)]
2#![allow(non_upper_case_globals)]
3#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
4#[repr(i32)]
5pub enum EPlatformType {
6 Unknown = 0,
7 Win32 = 1,
8 Win64 = 2,
9 Linux = 3,
10 OSX = 4,
11 PS3 = 5,
12 Linux32 = 6,
13 Android32 = 7,
14 Android64 = 8,
15 IOS32 = 9,
16 IOS64 = 10,
17 TVOS = 11,
18 EmbeddedClient = 12,
19 Browser = 13,
20}
21
22impl EPlatformType {
23 pub fn from_i32(val: i32) -> Option<Self> {
24 match val {
25 x if x == Self::Unknown as i32 => Some(Self::Unknown),
26 x if x == Self::Win32 as i32 => Some(Self::Win32),
27 x if x == Self::Win64 as i32 => Some(Self::Win64),
28 x if x == Self::Linux as i32 => Some(Self::Linux),
29 x if x == Self::OSX as i32 => Some(Self::OSX),
30 x if x == Self::PS3 as i32 => Some(Self::PS3),
31 x if x == Self::Linux32 as i32 => Some(Self::Linux32),
32 x if x == Self::Android32 as i32 => Some(Self::Android32),
33 x if x == Self::Android64 as i32 => Some(Self::Android64),
34 x if x == Self::IOS32 as i32 => Some(Self::IOS32),
35 x if x == Self::IOS64 as i32 => Some(Self::IOS64),
36 x if x == Self::TVOS as i32 => Some(Self::TVOS),
37 x if x == Self::EmbeddedClient as i32 => Some(Self::EmbeddedClient),
38 x if x == Self::Browser as i32 => Some(Self::Browser),
39 _ => None,
40 }
41 }
42}