Skip to main content

steam_enums/
echildprocessqueryexitcode.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 EChildProcessQueryExitCode {
6    ErrorNotSupportedByPlatform = -5,
7    ErrorFileSave = -4,
8    ErrorUnimplemented = -3,
9    ErrorOther = -2,
10    ErrorCommandline = -1,
11    Success = 0,
12}
13
14impl EChildProcessQueryExitCode {
15    pub fn from_i32(val: i32) -> Option<Self> {
16        match val {
17            x if x == Self::ErrorNotSupportedByPlatform as i32 => Some(Self::ErrorNotSupportedByPlatform),
18            x if x == Self::ErrorFileSave as i32 => Some(Self::ErrorFileSave),
19            x if x == Self::ErrorUnimplemented as i32 => Some(Self::ErrorUnimplemented),
20            x if x == Self::ErrorOther as i32 => Some(Self::ErrorOther),
21            x if x == Self::ErrorCommandline as i32 => Some(Self::ErrorCommandline),
22            x if x == Self::Success as i32 => Some(Self::Success),
23            _ => None,
24        }
25    }
26}