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 EStreamColorspace {
    Unknown = 0,
    BT601 = 1,
    BT601_Full = 2,
    BT709 = 3,
    BT709_Full = 4,
    HDR10 = 5,
}

impl EStreamColorspace {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Unknown as i32 => Some(Self::Unknown),
            x if x == Self::BT601 as i32 => Some(Self::BT601),
            x if x == Self::BT601_Full as i32 => Some(Self::BT601_Full),
            x if x == Self::BT709 as i32 => Some(Self::BT709),
            x if x == Self::BT709_Full as i32 => Some(Self::BT709_Full),
            x if x == Self::HDR10 as i32 => Some(Self::HDR10),
            _ => None,
        }
    }
}