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 EFrameAccumulatedStat {
    FPS = 0,
    CaptureDurationMS = 1,
    ConvertDurationMS = 2,
    EncodeDurationMS = 3,
    SteamDurationMS = 4,
    ServerDurationMS = 5,
    NetworkDurationMS = 6,
    DecodeDurationMS = 7,
    DisplayDurationMS = 8,
    ClientDurationMS = 9,
    FrameDurationMS = 10,
    InputLatencyMS = 11,
    GameLatencyMS = 12,
    RoundTripLatencyMS = 13,
    PingTimeMS = 14,
    ServerBitrateKbitPerSec = 15,
    ClientBitrateKbitPerSec = 16,
    LinkBandwidthKbitPerSec = 17,
    PacketLossPercentage = 18,
}

impl EFrameAccumulatedStat {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::FPS as i32 => Some(Self::FPS),
            x if x == Self::CaptureDurationMS as i32 => Some(Self::CaptureDurationMS),
            x if x == Self::ConvertDurationMS as i32 => Some(Self::ConvertDurationMS),
            x if x == Self::EncodeDurationMS as i32 => Some(Self::EncodeDurationMS),
            x if x == Self::SteamDurationMS as i32 => Some(Self::SteamDurationMS),
            x if x == Self::ServerDurationMS as i32 => Some(Self::ServerDurationMS),
            x if x == Self::NetworkDurationMS as i32 => Some(Self::NetworkDurationMS),
            x if x == Self::DecodeDurationMS as i32 => Some(Self::DecodeDurationMS),
            x if x == Self::DisplayDurationMS as i32 => Some(Self::DisplayDurationMS),
            x if x == Self::ClientDurationMS as i32 => Some(Self::ClientDurationMS),
            x if x == Self::FrameDurationMS as i32 => Some(Self::FrameDurationMS),
            x if x == Self::InputLatencyMS as i32 => Some(Self::InputLatencyMS),
            x if x == Self::GameLatencyMS as i32 => Some(Self::GameLatencyMS),
            x if x == Self::RoundTripLatencyMS as i32 => Some(Self::RoundTripLatencyMS),
            x if x == Self::PingTimeMS as i32 => Some(Self::PingTimeMS),
            x if x == Self::ServerBitrateKbitPerSec as i32 => Some(Self::ServerBitrateKbitPerSec),
            x if x == Self::ClientBitrateKbitPerSec as i32 => Some(Self::ClientBitrateKbitPerSec),
            x if x == Self::LinkBandwidthKbitPerSec as i32 => Some(Self::LinkBandwidthKbitPerSec),
            x if x == Self::PacketLossPercentage as i32 => Some(Self::PacketLossPercentage),
            _ => None,
        }
    }
}