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 EStorageFormatStage {
    Invalid = 0,
    NotRunning = 1,
    Starting = 2,
    Testing = 3,
    Rescuing = 4,
    Formatting = 5,
    Finalizing = 6,
}

impl EStorageFormatStage {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Invalid as i32 => Some(Self::Invalid),
            x if x == Self::NotRunning as i32 => Some(Self::NotRunning),
            x if x == Self::Starting as i32 => Some(Self::Starting),
            x if x == Self::Testing as i32 => Some(Self::Testing),
            x if x == Self::Rescuing as i32 => Some(Self::Rescuing),
            x if x == Self::Formatting as i32 => Some(Self::Formatting),
            x if x == Self::Finalizing as i32 => Some(Self::Finalizing),
            _ => None,
        }
    }
}