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 EUnlockStyle {
    Succeeded = 0,
    Failed_PreReq = 1,
    Failed_CantAfford = 2,
    Failed_CantCommit = 3,
    Failed_CantLockCache = 4,
    Failed_CantAffordAttrib = 5,
}

impl EUnlockStyle {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Succeeded as i32 => Some(Self::Succeeded),
            x if x == Self::Failed_PreReq as i32 => Some(Self::Failed_PreReq),
            x if x == Self::Failed_CantAfford as i32 => Some(Self::Failed_CantAfford),
            x if x == Self::Failed_CantCommit as i32 => Some(Self::Failed_CantCommit),
            x if x == Self::Failed_CantLockCache as i32 => Some(Self::Failed_CantLockCache),
            x if x == Self::Failed_CantAffordAttrib as i32 => Some(Self::Failed_CantAffordAttrib),
            _ => None,
        }
    }
}