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 EClanPermission {
    Nobody = 0,
    Owner = 1,
    Officer = 2,
    OwnerAndOfficer = 3,
    Member = 4,
    Moderator = 8,
    OGGGameOwner = 16,
    NonMember = 128,
}

impl EClanPermission {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Nobody as i32 => Some(Self::Nobody),
            x if x == Self::Owner as i32 => Some(Self::Owner),
            x if x == Self::Officer as i32 => Some(Self::Officer),
            x if x == Self::OwnerAndOfficer as i32 => Some(Self::OwnerAndOfficer),
            x if x == Self::Member as i32 => Some(Self::Member),
            x if x == Self::Moderator as i32 => Some(Self::Moderator),
            x if x == Self::OGGGameOwner as i32 => Some(Self::OGGGameOwner),
            x if x == Self::NonMember as i32 => Some(Self::NonMember),
            _ => None,
        }
    }
}