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 ESystemAudioPortType {
    Invalid = 0,
    Unknown = 1,
    Audio32f = 2,
    Midi8b = 3,
    Video32RGBA = 4,
}

impl ESystemAudioPortType {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Invalid as i32 => Some(Self::Invalid),
            x if x == Self::Unknown as i32 => Some(Self::Unknown),
            x if x == Self::Audio32f as i32 => Some(Self::Audio32f),
            x if x == Self::Midi8b as i32 => Some(Self::Midi8b),
            x if x == Self::Video32RGBA as i32 => Some(Self::Video32RGBA),
            _ => None,
        }
    }
}