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 EClanRank {
    None = 0,
    Owner = 1,
    Officer = 2,
    Member = 3,
    Moderator = 4,
}

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