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 EChatRoomEnterResponse {
    Success = 1,
    DoesntExist = 2,
    NotAllowed = 3,
    Full = 4,
    Error = 5,
    Banned = 6,
    Limited = 7,
    ClanDisabled = 8,
    CommunityBan = 9,
    MemberBlockedYou = 10,
    YouBlockedMember = 11,
    NoRankingDataLobby = 12,
    NoRankingDataUser = 13,
    RankOutOfRange = 14,
}

impl EChatRoomEnterResponse {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Success as i32 => Some(Self::Success),
            x if x == Self::DoesntExist as i32 => Some(Self::DoesntExist),
            x if x == Self::NotAllowed as i32 => Some(Self::NotAllowed),
            x if x == Self::Full as i32 => Some(Self::Full),
            x if x == Self::Error as i32 => Some(Self::Error),
            x if x == Self::Banned as i32 => Some(Self::Banned),
            x if x == Self::Limited as i32 => Some(Self::Limited),
            x if x == Self::ClanDisabled as i32 => Some(Self::ClanDisabled),
            x if x == Self::CommunityBan as i32 => Some(Self::CommunityBan),
            x if x == Self::MemberBlockedYou as i32 => Some(Self::MemberBlockedYou),
            x if x == Self::YouBlockedMember as i32 => Some(Self::YouBlockedMember),
            x if x == Self::NoRankingDataLobby as i32 => Some(Self::NoRankingDataLobby),
            x if x == Self::NoRankingDataUser as i32 => Some(Self::NoRankingDataUser),
            x if x == Self::RankOutOfRange as i32 => Some(Self::RankOutOfRange),
            _ => None,
        }
    }
}