steam-enums 0.1.2

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 EGCBaseClientMsg {
    ClientWelcome = 4004,
    ServerWelcome = 4005,
    ClientHello = 4006,
    ServerHello = 4007,
    ClientConnectionStatus = 4009,
    ServerConnectionStatus = 4010,
    ClientHelloPartner = 4011,
    ClientHelloPW = 4012,
    ClientHelloR2 = 4013,
    ClientHelloR3 = 4014,
    ClientHelloR4 = 4015,
}

impl EGCBaseClientMsg {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::ClientWelcome as i32 => Some(Self::ClientWelcome),
            x if x == Self::ServerWelcome as i32 => Some(Self::ServerWelcome),
            x if x == Self::ClientHello as i32 => Some(Self::ClientHello),
            x if x == Self::ServerHello as i32 => Some(Self::ServerHello),
            x if x == Self::ClientConnectionStatus as i32 => Some(Self::ClientConnectionStatus),
            x if x == Self::ServerConnectionStatus as i32 => Some(Self::ServerConnectionStatus),
            x if x == Self::ClientHelloPartner as i32 => Some(Self::ClientHelloPartner),
            x if x == Self::ClientHelloPW as i32 => Some(Self::ClientHelloPW),
            x if x == Self::ClientHelloR2 as i32 => Some(Self::ClientHelloR2),
            x if x == Self::ClientHelloR3 as i32 => Some(Self::ClientHelloR3),
            x if x == Self::ClientHelloR4 as i32 => Some(Self::ClientHelloR4),
            _ => None,
        }
    }
}