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 EStreamActivity {
    Idle = 1,
    Game = 2,
    Desktop = 3,
    SecureDesktop = 4,
    Music = 5,
}

impl EStreamActivity {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Idle as i32 => Some(Self::Idle),
            x if x == Self::Game as i32 => Some(Self::Game),
            x if x == Self::Desktop as i32 => Some(Self::Desktop),
            x if x == Self::SecureDesktop as i32 => Some(Self::SecureDesktop),
            x if x == Self::Music as i32 => Some(Self::Music),
            _ => None,
        }
    }
}