Skip to main content

steam_enums/
eappusageevent.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 EAppUsageEvent {
6    GameLaunch = 1,
7    GameLaunchTrial = 2,
8    Media = 3,
9    PreloadStart = 4,
10    PreloadFinish = 5,
11    MarketingMessageView = 6,
12    InGameAdViewed = 7,
13    GameLaunchFreeWeekend = 8,
14}
15
16impl EAppUsageEvent {
17    pub fn from_i32(val: i32) -> Option<Self> {
18        match val {
19            x if x == Self::GameLaunch as i32 => Some(Self::GameLaunch),
20            x if x == Self::GameLaunchTrial as i32 => Some(Self::GameLaunchTrial),
21            x if x == Self::Media as i32 => Some(Self::Media),
22            x if x == Self::PreloadStart as i32 => Some(Self::PreloadStart),
23            x if x == Self::PreloadFinish as i32 => Some(Self::PreloadFinish),
24            x if x == Self::MarketingMessageView as i32 => Some(Self::MarketingMessageView),
25            x if x == Self::InGameAdViewed as i32 => Some(Self::InGameAdViewed),
26            x if x == Self::GameLaunchFreeWeekend as i32 => Some(Self::GameLaunchFreeWeekend),
27            _ => None,
28        }
29    }
30}