steam_enums/
eactivationcodeclass.rs1#![allow(non_camel_case_types)]
2#![allow(non_upper_case_globals)]
3#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
4#[repr(i64)]
5pub enum EActivationCodeClass {
6 WonCDKey = 0,
7 ValveCDKey = 1,
8 Doom3CDKey = 2,
9 DBLookup = 3,
10 Steam2010Key = 4,
11 Max = 5,
12 Test = 2147483647,
13 Invalid = 4294967295,
14}
15
16impl EActivationCodeClass {
17 pub fn from_i32(val: i32) -> Option<Self> {
18 match val {
19 x if x == Self::WonCDKey as i32 => Some(Self::WonCDKey),
20 x if x == Self::ValveCDKey as i32 => Some(Self::ValveCDKey),
21 x if x == Self::Doom3CDKey as i32 => Some(Self::Doom3CDKey),
22 x if x == Self::DBLookup as i32 => Some(Self::DBLookup),
23 x if x == Self::Steam2010Key as i32 => Some(Self::Steam2010Key),
24 x if x == Self::Max as i32 => Some(Self::Max),
25 x if x == Self::Test as i32 => Some(Self::Test),
26 x if x == Self::Invalid as i32 => Some(Self::Invalid),
27 _ => None,
28 }
29 }
30}