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 EAuthTokenRevokeAction {
    Logout = 0,
    Permanent = 1,
    Replaced = 2,
    Support = 3,
    Consume = 4,
    NonRememberedLogout = 5,
    NonRememberedPermanent = 6,
    Automatic = 7,
}

impl EAuthTokenRevokeAction {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Logout as i32 => Some(Self::Logout),
            x if x == Self::Permanent as i32 => Some(Self::Permanent),
            x if x == Self::Replaced as i32 => Some(Self::Replaced),
            x if x == Self::Support as i32 => Some(Self::Support),
            x if x == Self::Consume as i32 => Some(Self::Consume),
            x if x == Self::NonRememberedLogout as i32 => Some(Self::NonRememberedLogout),
            x if x == Self::NonRememberedPermanent as i32 => Some(Self::NonRememberedPermanent),
            x if x == Self::Automatic as i32 => Some(Self::Automatic),
            _ => None,
        }
    }
}