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 EChatFlags {
    Locked = 1,
    InvisibleToFriends = 2,
    Moderated = 4,
    Unjoinable = 8,
}

impl EChatFlags {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Locked as i32 => Some(Self::Locked),
            x if x == Self::InvisibleToFriends as i32 => Some(Self::InvisibleToFriends),
            x if x == Self::Moderated as i32 => Some(Self::Moderated),
            x if x == Self::Unjoinable as i32 => Some(Self::Unjoinable),
            _ => None,
        }
    }
}