steam-enums 0.1.2

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 EChatRoomType {
    Friend = 1,
    MUC = 2,
    Lobby = 3,
}

impl EChatRoomType {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Friend as i32 => Some(Self::Friend),
            x if x == Self::MUC as i32 => Some(Self::MUC),
            x if x == Self::Lobby as i32 => Some(Self::Lobby),
            _ => None,
        }
    }
}