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 ESteamNotificationType {
    Invalid = 0,
    Test = 1,
    Gift = 2,
    Comment = 3,
    Item = 4,
    FriendInvite = 5,
    MajorSale = 6,
    PreloadAvailable = 7,
    Wishlist = 8,
    TradeOffer = 9,
    General = 10,
    HelpRequest = 11,
    AsyncGame = 12,
    ChatMsg = 13,
    ModeratorMsg = 14,
    ParentalFeatureAccessRequest = 15,
    FamilyInvite = 16,
    FamilyPurchaseRequest = 17,
    ParentalPlaytimeRequest = 18,
    FamilyPurchaseRequestResponse = 19,
    ParentalFeatureAccessResponse = 20,
    ParentalPlaytimeResponse = 21,
    RequestedGameAdded = 22,
    SendToPhone = 23,
    ClipDownloaded = 24,
    TwoFactorPrompt = 25,
    MobileConfirmation = 26,
    PartnerEvent = 27,
    PlaytestInvite = 28,
    TradeReversal = 29,
}

impl ESteamNotificationType {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Invalid as i32 => Some(Self::Invalid),
            x if x == Self::Test as i32 => Some(Self::Test),
            x if x == Self::Gift as i32 => Some(Self::Gift),
            x if x == Self::Comment as i32 => Some(Self::Comment),
            x if x == Self::Item as i32 => Some(Self::Item),
            x if x == Self::FriendInvite as i32 => Some(Self::FriendInvite),
            x if x == Self::MajorSale as i32 => Some(Self::MajorSale),
            x if x == Self::PreloadAvailable as i32 => Some(Self::PreloadAvailable),
            x if x == Self::Wishlist as i32 => Some(Self::Wishlist),
            x if x == Self::TradeOffer as i32 => Some(Self::TradeOffer),
            x if x == Self::General as i32 => Some(Self::General),
            x if x == Self::HelpRequest as i32 => Some(Self::HelpRequest),
            x if x == Self::AsyncGame as i32 => Some(Self::AsyncGame),
            x if x == Self::ChatMsg as i32 => Some(Self::ChatMsg),
            x if x == Self::ModeratorMsg as i32 => Some(Self::ModeratorMsg),
            x if x == Self::ParentalFeatureAccessRequest as i32 => Some(Self::ParentalFeatureAccessRequest),
            x if x == Self::FamilyInvite as i32 => Some(Self::FamilyInvite),
            x if x == Self::FamilyPurchaseRequest as i32 => Some(Self::FamilyPurchaseRequest),
            x if x == Self::ParentalPlaytimeRequest as i32 => Some(Self::ParentalPlaytimeRequest),
            x if x == Self::FamilyPurchaseRequestResponse as i32 => Some(Self::FamilyPurchaseRequestResponse),
            x if x == Self::ParentalFeatureAccessResponse as i32 => Some(Self::ParentalFeatureAccessResponse),
            x if x == Self::ParentalPlaytimeResponse as i32 => Some(Self::ParentalPlaytimeResponse),
            x if x == Self::RequestedGameAdded as i32 => Some(Self::RequestedGameAdded),
            x if x == Self::SendToPhone as i32 => Some(Self::SendToPhone),
            x if x == Self::ClipDownloaded as i32 => Some(Self::ClipDownloaded),
            x if x == Self::TwoFactorPrompt as i32 => Some(Self::TwoFactorPrompt),
            x if x == Self::MobileConfirmation as i32 => Some(Self::MobileConfirmation),
            x if x == Self::PartnerEvent as i32 => Some(Self::PartnerEvent),
            x if x == Self::PlaytestInvite as i32 => Some(Self::PlaytestInvite),
            x if x == Self::TradeReversal as i32 => Some(Self::TradeReversal),
            _ => None,
        }
    }
}