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 EAuthenticationType {
    Unknown = 0,
    Password = 1,
    QR = 2,
    AccountCreation = 3,
    GuestAccount = 4,
}

impl EAuthenticationType {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Unknown as i32 => Some(Self::Unknown),
            x if x == Self::Password as i32 => Some(Self::Password),
            x if x == Self::QR as i32 => Some(Self::QR),
            x if x == Self::AccountCreation as i32 => Some(Self::AccountCreation),
            x if x == Self::GuestAccount as i32 => Some(Self::GuestAccount),
            _ => None,
        }
    }
}