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 EStreamDeviceFormFactor {
    Unknown = 0,
    Phone = 1,
    Tablet = 2,
    Computer = 3,
    TV = 4,
    VRHeadset = 5,
}

impl EStreamDeviceFormFactor {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Unknown as i32 => Some(Self::Unknown),
            x if x == Self::Phone as i32 => Some(Self::Phone),
            x if x == Self::Tablet as i32 => Some(Self::Tablet),
            x if x == Self::Computer as i32 => Some(Self::Computer),
            x if x == Self::TV as i32 => Some(Self::TV),
            x if x == Self::VRHeadset as i32 => Some(Self::VRHeadset),
            _ => None,
        }
    }
}