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

impl ESDCardFormatStage {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Invalid as i32 => Some(Self::Invalid),
            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,
        }
    }
}