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 EMarketingMessageAssociationType {
    NoAssociation = 0,
    AppAssociation = 1,
    SubscriptionAssociation = 2,
    PublisherAssociation = 3,
    GenreAssociation = 4,
    BundleAssociation = 5,
}

impl EMarketingMessageAssociationType {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::NoAssociation as i32 => Some(Self::NoAssociation),
            x if x == Self::AppAssociation as i32 => Some(Self::AppAssociation),
            x if x == Self::SubscriptionAssociation as i32 => Some(Self::SubscriptionAssociation),
            x if x == Self::PublisherAssociation as i32 => Some(Self::PublisherAssociation),
            x if x == Self::GenreAssociation as i32 => Some(Self::GenreAssociation),
            x if x == Self::BundleAssociation as i32 => Some(Self::BundleAssociation),
            _ => None,
        }
    }
}