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 ESystemPowerState {
    Invalid = 0,
    Normal = 1,
    LowPowerDownloads = 2,
    Sleep = 3,
}

impl ESystemPowerState {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Invalid as i32 => Some(Self::Invalid),
            x if x == Self::Normal as i32 => Some(Self::Normal),
            x if x == Self::LowPowerDownloads as i32 => Some(Self::LowPowerDownloads),
            x if x == Self::Sleep as i32 => Some(Self::Sleep),
            _ => None,
        }
    }
}