Skip to main content

steam_enums/
eclientreportingversion.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 EClientReportingVersion {
6    OldVersion = 0,
7    BetaVersion = 1,
8    SupportsTrustedMode = 2,
9}
10
11impl EClientReportingVersion {
12    pub fn from_i32(val: i32) -> Option<Self> {
13        match val {
14            x if x == Self::OldVersion as i32 => Some(Self::OldVersion),
15            x if x == Self::BetaVersion as i32 => Some(Self::BetaVersion),
16            x if x == Self::SupportsTrustedMode as i32 => Some(Self::SupportsTrustedMode),
17            _ => None,
18        }
19    }
20}