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 ETeam {
    Unknown = 0,
    Spectator = 1,
    Terrorist = 2,
    CT = 3,
}

impl ETeam {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Unknown as i32 => Some(Self::Unknown),
            x if x == Self::Spectator as i32 => Some(Self::Spectator),
            x if x == Self::Terrorist as i32 => Some(Self::Terrorist),
            x if x == Self::CT as i32 => Some(Self::CT),
            _ => None,
        }
    }
}