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 EPressOutletAction {
    Invalid = 0,
    Granted = 1,
    Removed = 2,
    Created = 3,
    Updated = 4,
    Deleted = 5,
    Undeleted = 6,
    MAX = 7,
}

impl EPressOutletAction {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Invalid as i32 => Some(Self::Invalid),
            x if x == Self::Granted as i32 => Some(Self::Granted),
            x if x == Self::Removed as i32 => Some(Self::Removed),
            x if x == Self::Created as i32 => Some(Self::Created),
            x if x == Self::Updated as i32 => Some(Self::Updated),
            x if x == Self::Deleted as i32 => Some(Self::Deleted),
            x if x == Self::Undeleted as i32 => Some(Self::Undeleted),
            x if x == Self::MAX as i32 => Some(Self::MAX),
            _ => None,
        }
    }
}