Skip to main content

steam_enums/
eauthsessionguardtype.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 EAuthSessionGuardType {
6    Unknown = 0,
7    None = 1,
8    EmailCode = 2,
9    DeviceCode = 3,
10    DeviceConfirmation = 4,
11    EmailConfirmation = 5,
12    MachineToken = 6,
13    LegacyMachineAuth = 7,
14}
15
16impl EAuthSessionGuardType {
17    pub fn from_i32(val: i32) -> Option<Self> {
18        match val {
19            x if x == Self::Unknown as i32 => Some(Self::Unknown),
20            x if x == Self::None as i32 => Some(Self::None),
21            x if x == Self::EmailCode as i32 => Some(Self::EmailCode),
22            x if x == Self::DeviceCode as i32 => Some(Self::DeviceCode),
23            x if x == Self::DeviceConfirmation as i32 => Some(Self::DeviceConfirmation),
24            x if x == Self::EmailConfirmation as i32 => Some(Self::EmailConfirmation),
25            x if x == Self::MachineToken as i32 => Some(Self::MachineToken),
26            x if x == Self::LegacyMachineAuth as i32 => Some(Self::LegacyMachineAuth),
27            _ => None,
28        }
29    }
30}