Skip to main content

steam_enums/
ecommentthreadtype.rs

1#![allow(non_camel_case_types)]
2#![allow(non_upper_case_globals)]
3#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
4#[repr(i32)]
5pub enum ECommentThreadType {
6    Invalid = 0,
7    Screenshot_Deprecated = 1,
8    WorkshopAccount_Developer = 2,
9    WorkshopAccount_Public = 3,
10    PublishedFile_Developer = 4,
11    PublishedFile_Public = 5,
12    Test = 6,
13    ForumTopic = 7,
14    Recommendation = 8,
15    Video_Deprecated = 9,
16    Profile = 10,
17    NewsPost = 11,
18    Clan = 12,
19    ClanAnnouncement = 13,
20    ClanEvent = 14,
21    UserStatusPublished = 15,
22    UserReceivedNewGame = 16,
23    PublishedFile_Announcement = 17,
24    ModeratorMessage = 18,
25    ClanCuratedApp = 19,
26    QAndASession = 20,
27    Max = 21,
28}
29
30impl ECommentThreadType {
31    pub fn from_i32(val: i32) -> Option<Self> {
32        match val {
33            x if x == Self::Invalid as i32 => Some(Self::Invalid),
34            x if x == Self::Screenshot_Deprecated as i32 => Some(Self::Screenshot_Deprecated),
35            x if x == Self::WorkshopAccount_Developer as i32 => Some(Self::WorkshopAccount_Developer),
36            x if x == Self::WorkshopAccount_Public as i32 => Some(Self::WorkshopAccount_Public),
37            x if x == Self::PublishedFile_Developer as i32 => Some(Self::PublishedFile_Developer),
38            x if x == Self::PublishedFile_Public as i32 => Some(Self::PublishedFile_Public),
39            x if x == Self::Test as i32 => Some(Self::Test),
40            x if x == Self::ForumTopic as i32 => Some(Self::ForumTopic),
41            x if x == Self::Recommendation as i32 => Some(Self::Recommendation),
42            x if x == Self::Video_Deprecated as i32 => Some(Self::Video_Deprecated),
43            x if x == Self::Profile as i32 => Some(Self::Profile),
44            x if x == Self::NewsPost as i32 => Some(Self::NewsPost),
45            x if x == Self::Clan as i32 => Some(Self::Clan),
46            x if x == Self::ClanAnnouncement as i32 => Some(Self::ClanAnnouncement),
47            x if x == Self::ClanEvent as i32 => Some(Self::ClanEvent),
48            x if x == Self::UserStatusPublished as i32 => Some(Self::UserStatusPublished),
49            x if x == Self::UserReceivedNewGame as i32 => Some(Self::UserReceivedNewGame),
50            x if x == Self::PublishedFile_Announcement as i32 => Some(Self::PublishedFile_Announcement),
51            x if x == Self::ModeratorMessage as i32 => Some(Self::ModeratorMessage),
52            x if x == Self::ClanCuratedApp as i32 => Some(Self::ClanCuratedApp),
53            x if x == Self::QAndASession as i32 => Some(Self::QAndASession),
54            x if x == Self::Max as i32 => Some(Self::Max),
55            _ => None,
56        }
57    }
58}