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 ECompromiseDetectionType {
    None = 0,
    TradeEvent = 1,
    ApiCallRate = 2,
    Manual = 3,
    TicketAction = 4,
    MaliciousRefund = 5,
    Move2FA = 6,
    DeviceType = 7,
}

impl ECompromiseDetectionType {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::None as i32 => Some(Self::None),
            x if x == Self::TradeEvent as i32 => Some(Self::TradeEvent),
            x if x == Self::ApiCallRate as i32 => Some(Self::ApiCallRate),
            x if x == Self::Manual as i32 => Some(Self::Manual),
            x if x == Self::TicketAction as i32 => Some(Self::TicketAction),
            x if x == Self::MaliciousRefund as i32 => Some(Self::MaliciousRefund),
            x if x == Self::Move2FA as i32 => Some(Self::Move2FA),
            x if x == Self::DeviceType as i32 => Some(Self::DeviceType),
            _ => None,
        }
    }
}