steam_enums/
ecodecusageplatform.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 ECodecUsagePlatform {
6 Unknown = 0,
7 Windows = 1,
8 MacOS = 2,
9 Linux = 3,
10 SteamDeck = 4,
11}
12
13impl ECodecUsagePlatform {
14 pub fn from_i32(val: i32) -> Option<Self> {
15 match val {
16 x if x == Self::Unknown as i32 => Some(Self::Unknown),
17 x if x == Self::Windows as i32 => Some(Self::Windows),
18 x if x == Self::MacOS as i32 => Some(Self::MacOS),
19 x if x == Self::Linux as i32 => Some(Self::Linux),
20 x if x == Self::SteamDeck as i32 => Some(Self::SteamDeck),
21 _ => None,
22 }
23 }
24}