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 ECsgoSteamUserStat {
    XpEarnedGames = 1,
    MatchWinsCompetitive = 2,
    SurvivedDangerZone = 3,
}

impl ECsgoSteamUserStat {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::XpEarnedGames as i32 => Some(Self::XpEarnedGames),
            x if x == Self::MatchWinsCompetitive as i32 => Some(Self::MatchWinsCompetitive),
            x if x == Self::SurvivedDangerZone as i32 => Some(Self::SurvivedDangerZone),
            _ => None,
        }
    }
}