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 EChatAction {
    InviteChat = 1,
    Kick = 2,
    Ban = 3,
    UnBan = 4,
    StartVoiceSpeak = 5,
    EndVoiceSpeak = 6,
    LockChat = 7,
    UnlockChat = 8,
    CloseChat = 9,
    SetJoinable = 10,
    SetUnjoinable = 11,
    SetOwner = 12,
    SetInvisibleToFriends = 13,
    SetVisibleToFriends = 14,
    SetModerated = 15,
    SetUnmoderated = 16,
}

impl EChatAction {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::InviteChat as i32 => Some(Self::InviteChat),
            x if x == Self::Kick as i32 => Some(Self::Kick),
            x if x == Self::Ban as i32 => Some(Self::Ban),
            x if x == Self::UnBan as i32 => Some(Self::UnBan),
            x if x == Self::StartVoiceSpeak as i32 => Some(Self::StartVoiceSpeak),
            x if x == Self::EndVoiceSpeak as i32 => Some(Self::EndVoiceSpeak),
            x if x == Self::LockChat as i32 => Some(Self::LockChat),
            x if x == Self::UnlockChat as i32 => Some(Self::UnlockChat),
            x if x == Self::CloseChat as i32 => Some(Self::CloseChat),
            x if x == Self::SetJoinable as i32 => Some(Self::SetJoinable),
            x if x == Self::SetUnjoinable as i32 => Some(Self::SetUnjoinable),
            x if x == Self::SetOwner as i32 => Some(Self::SetOwner),
            x if x == Self::SetInvisibleToFriends as i32 => Some(Self::SetInvisibleToFriends),
            x if x == Self::SetVisibleToFriends as i32 => Some(Self::SetVisibleToFriends),
            x if x == Self::SetModerated as i32 => Some(Self::SetModerated),
            x if x == Self::SetUnmoderated as i32 => Some(Self::SetUnmoderated),
            _ => None,
        }
    }
}