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 EStreamAudioCodec {
    None = 0,
    Raw = 1,
    Vorbis = 2,
    Opus = 3,
    MP3 = 4,
    AAC = 5,
}

impl EStreamAudioCodec {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::None as i32 => Some(Self::None),
            x if x == Self::Raw as i32 => Some(Self::Raw),
            x if x == Self::Vorbis as i32 => Some(Self::Vorbis),
            x if x == Self::Opus as i32 => Some(Self::Opus),
            x if x == Self::MP3 as i32 => Some(Self::MP3),
            x if x == Self::AAC as i32 => Some(Self::AAC),
            _ => None,
        }
    }
}