steam-enums 0.1.0

Steam protocol enumerations (EResult, EMsg, EAccountType, etc.) for Rust.
Documentation
#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EAppUsageEvent {
    GameLaunch = 1,
    GameLaunchTrial = 2,
    Media = 3,
    PreloadStart = 4,
    PreloadFinish = 5,
    MarketingMessageView = 6,
    InGameAdViewed = 7,
    GameLaunchFreeWeekend = 8,
}

impl EAppUsageEvent {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::GameLaunch as i32 => Some(Self::GameLaunch),
            x if x == Self::GameLaunchTrial as i32 => Some(Self::GameLaunchTrial),
            x if x == Self::Media as i32 => Some(Self::Media),
            x if x == Self::PreloadStart as i32 => Some(Self::PreloadStart),
            x if x == Self::PreloadFinish as i32 => Some(Self::PreloadFinish),
            x if x == Self::MarketingMessageView as i32 => Some(Self::MarketingMessageView),
            x if x == Self::InGameAdViewed as i32 => Some(Self::InGameAdViewed),
            x if x == Self::GameLaunchFreeWeekend as i32 => Some(Self::GameLaunchFreeWeekend),
            _ => None,
        }
    }
}