steam_enums/
egpuperformancelevel.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 EGPUPerformanceLevel {
6 Invalid = 0,
7 Auto = 1,
8 Manual = 2,
9 Low = 3,
10 High = 4,
11 Profiling = 5,
12}
13
14impl EGPUPerformanceLevel {
15 pub fn from_i32(val: i32) -> Option<Self> {
16 match val {
17 x if x == Self::Invalid as i32 => Some(Self::Invalid),
18 x if x == Self::Auto as i32 => Some(Self::Auto),
19 x if x == Self::Manual as i32 => Some(Self::Manual),
20 x if x == Self::Low as i32 => Some(Self::Low),
21 x if x == Self::High as i32 => Some(Self::High),
22 x if x == Self::Profiling as i32 => Some(Self::Profiling),
23 _ => None,
24 }
25 }
26}