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 EStorageDriveMediaType {
    Invalid = 0,
    Unknown = 1,
    HDD = 2,
    SSD = 3,
    Removable = 4,
}

impl EStorageDriveMediaType {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Invalid as i32 => Some(Self::Invalid),
            x if x == Self::Unknown as i32 => Some(Self::Unknown),
            x if x == Self::HDD as i32 => Some(Self::HDD),
            x if x == Self::SSD as i32 => Some(Self::SSD),
            x if x == Self::Removable as i32 => Some(Self::Removable),
            _ => None,
        }
    }
}