steam_enums/
eserverflags.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 EServerFlags {
6 None = 0,
7 Active = 1,
8 Secure = 2,
9 Dedicated = 4,
10 Linux = 8,
11 Passworded = 16,
12 Private = 32,
13}
14
15impl EServerFlags {
16 pub fn from_i32(val: i32) -> Option<Self> {
17 match val {
18 x if x == Self::None as i32 => Some(Self::None),
19 x if x == Self::Active as i32 => Some(Self::Active),
20 x if x == Self::Secure as i32 => Some(Self::Secure),
21 x if x == Self::Dedicated as i32 => Some(Self::Dedicated),
22 x if x == Self::Linux as i32 => Some(Self::Linux),
23 x if x == Self::Passworded as i32 => Some(Self::Passworded),
24 x if x == Self::Private as i32 => Some(Self::Private),
25 _ => None,
26 }
27 }
28}