Skip to main content

steam_enums/
eaccounttype.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 EAccountType {
6    Invalid = 0,
7    Individual = 1,
8    Multiseat = 2,
9    GameServer = 3,
10    AnonGameServer = 4,
11    Pending = 5,
12    ContentServer = 6,
13    Clan = 7,
14    Chat = 8,
15    ConsoleUser = 9,
16    AnonUser = 10,
17}
18
19impl EAccountType {
20    pub fn from_i32(val: i32) -> Option<Self> {
21        match val {
22            x if x == Self::Invalid as i32 => Some(Self::Invalid),
23            x if x == Self::Individual as i32 => Some(Self::Individual),
24            x if x == Self::Multiseat as i32 => Some(Self::Multiseat),
25            x if x == Self::GameServer as i32 => Some(Self::GameServer),
26            x if x == Self::AnonGameServer as i32 => Some(Self::AnonGameServer),
27            x if x == Self::Pending as i32 => Some(Self::Pending),
28            x if x == Self::ContentServer as i32 => Some(Self::ContentServer),
29            x if x == Self::Clan as i32 => Some(Self::Clan),
30            x if x == Self::Chat as i32 => Some(Self::Chat),
31            x if x == Self::ConsoleUser as i32 => Some(Self::ConsoleUser),
32            x if x == Self::AnonUser as i32 => Some(Self::AnonUser),
33            _ => None,
34        }
35    }
36}