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 EGCToGCMsg {
    MasterAck = 150,
    MasterAckResponse = 151,
    Routed = 152,
    RoutedReply = 153,
    UpdateSessionIP = 154,
    RequestSessionIP = 155,
    RequestSessionIPResponse = 156,
    MasterStartupComplete = 157,
}

impl EGCToGCMsg {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::MasterAck as i32 => Some(Self::MasterAck),
            x if x == Self::MasterAckResponse as i32 => Some(Self::MasterAckResponse),
            x if x == Self::Routed as i32 => Some(Self::Routed),
            x if x == Self::RoutedReply as i32 => Some(Self::RoutedReply),
            x if x == Self::UpdateSessionIP as i32 => Some(Self::UpdateSessionIP),
            x if x == Self::RequestSessionIP as i32 => Some(Self::RequestSessionIP),
            x if x == Self::RequestSessionIPResponse as i32 => Some(Self::RequestSessionIPResponse),
            x if x == Self::MasterStartupComplete as i32 => Some(Self::MasterStartupComplete),
            _ => None,
        }
    }
}